Java (@gaz_java) header
Java (@gaz_java) profile picture
Joined November 2015
Photo by Java (@gaz_java)Photo by Java (@gaz_java)Photo by Java (@gaz_java)Photo by Java (@gaz_java)
Java 8 – Merge Two Lists Using Streams rameshfadatare.com/java-prog…
6
31
287
23,284
Spring and Spring Boot Annotations Cheat Sheet rameshfadatare.com/cheat-she…
1
47
1
250
26,401
Session, Cookie, JWT, Token, SSO, and OAuth 2.0 Explained in One Diagram When you login to a website, your identity needs to be managed. Here is how different solutions work: - Session - The server stores your identity and gives the browser a session ID cookie. This allows the server to track login state. But cookies don't work well across devices. - Token - Your identity is encoded into a token sent to the browser. The browser sends this token on future requests for authentication. No server session storage is required. But tokens need encryption/decryption. - JWT - JSON Web Tokens standardize identity tokens using digital signatures for trust. The signature is contained in the token so no server session is needed. - SSO - Single Sign On uses a central authentication service. This allows a single login to work across multiple sites. - OAuth2 - Allows limited access to your data on one site by another site, without giving away passwords. - QR Code - Encodes a random token into a QR code for mobile login. Scanning the code logs you in without typing a password. Over to you: QR code logins are gaining popularity. Do you know how it works? – Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/3KCnWXq
1
160
747
65,256
Structure of JSON Web Token: [1] JWT is a standard for defining tokens. You can use them to represent claims. [2] A single JWT contains all the required info about an entity, making it ideal for authentication. [3] There are three main components of a JWT - header, payload, and signature. [4] The Header component of a JWT contains claims about the token [5] The Payload contains the registered claims and private claims about the users of the JWT [6] The Signature is meant to verify that the JWT [7] With JWT-based authentication, you don't need to maintain session-storage. This is different from session-based authentication. [8] Point 7 makes it easier to scale the client and server [9] But JWTs also have cons, such as invalidation, space issues, and stale data [10] To use JWTs, it's good to follow some best practices
1
47
1
276
21,409
GET, POST, PUT... Common HTTP “verbs” in one figure. Next week's topics will be listed at the end. 1. HTTP GET This retrieves a resource from the server. It is idempotent. Multiple identical requests return the same result. 2. HTTP PUT This updates or Creates a resource. It is idempotent. Multiple identical requests will update the same resource. 3. HTTP POST This is used to create new resources. It is not idempotent, making two identical POST will duplicate the resource creation. 4. HTTP DELETE This is used to delete a resource. It is idempotent. Multiple identical requests will delete the same resource. 5. HTTP PATCH The PATCH method applies partial modifications to a resource. 6. HTTP HEAD The HEAD method asks for a response identical to a GET request but without the response body. 7. HTTP CONNECT The CONNECT method establishes a tunnel to the server identified by the target resource. 8. HTTP OPTIONS This describes the communication options for the target resource. 9. HTTP TRACE This performs a message loop-back test along the path to the target resource. Over to you: What other HTTP verbs have you used? – Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): bit.ly/3KCnWXq
1
136
2
604
46,836
If you're learning web development, you'll probably start with HTML. It forms the backbone - the whole skeleton, really - of a website. In this guide, @casweb_dev teaches you how HTML basics like tags, elements, and attributes work with code examples. freecodecamp.org/news/introd…
2
18
136
12,043
Browser tools are helpful for debugging your code. And React has its own set of DevTools that let you access components, states, hooks, props, and more. In this guide, @msokola shows you how to use React Developer Tools with some helpful examples. freecodecamp.org/news/how-to…
27
160
11,523
If you want to improve your JavaScript and Angular skills, here's a course for you. You'll use these popular tools to build a chess game with an AI opponent. You'll also learn about chessboard dynamics, game mechanics, AI integration, and lots more. freecodecamp.org/news/code-a…
1
44
242
13,654
Web APIs help software applications communicate with each other over the internet. And they let you fetch data from external sources to use in your apps. In this guide, @Juliet_Omaa explains when to use web APIs and then demos them in a React project. freecodecamp.org/news/how-to…
40
1
190
12,293
In JavaScript, higher order functions accept functions as arguments and return them as results. And they're a powerful feature that can help you write clean, reusable code. In this guide, @codesbyjoan explains how HOFs work in JavaScript with examples. freecodecamp.org/news/higher…
24
118
9,303
In React, the useReducer hook is a powerful tool for managing state. It makes state transitions predictable, optimizes performance, and handles complex state management. In this guide, Timothy explains how to use the useReducer hook in your code. freecodecamp.org/news/react-…
17
119
9,184
Spring Boot Security with JWT Token Tutorial rameshfadatare.com/spring-bo… #springboot #springsecurity #jwt #java
3
22
143
11,243
HTML has certain elements for interacting with mobile phone features. Here, @codesbyjoan shows you how to use the <input> element to access the camera. You'll learn about type & capture attributes, how to capture from front & back-facing cameras & more. freecodecamp.org/news/how-to…
1
22
99
9,564
If you want to get into game development, here's a fun hands-on course for you. You'll learn to build an animated physics game with JS, HTML5, CSS, and HTML Canvas. It covers collision detection, drawing characters from sprite sheets, and lots more. freecodecamp.org/news/create…
2
43
205
11,411
The Ultimate Kafka 101 You Cannot Miss
7
271
4
1,535
209,396
8 Tips for Efficient API Design
8
390
1,970
267,469