FlashKeepers

Web Development · College · College and University

Web Authentication: Sessions, JWT and OAuth

Cookies and sessions, JWT structure, OAuth 2.0 grant types, OpenID Connect, CSRF, SameSite and password storage basics.

About this set

40 basic cards for College Web Development. It opens with "What is an HTTP cookie?" and "What does the HttpOnly attribute do on a cookie?". Study it alongside the other College sets below.

40 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone

Opens in your browser, no account. Get the iPhone and iPad app · Android app

What is an HTTP cookie?
Show answerA small piece of data stored on the client browser and sent with every request to the same domain.
What does the HttpOnly attribute do on a cookie?
Show answerPrevents JavaScript from accessing the cookie; it is only sent with HTTP requests.
What does the Secure attribute do on a cookie?
Show answerThe cookie is only sent over HTTPS, not plain HTTP.
What is a session in web authentication?
Show answerServer-side storage of user data associated with a unique session ID.
How do sessions and cookies work together?
Show answerThe server creates a session and stores its ID in a cookie on the client; the client sends the cookie with each request to retrieve session data.
What is a session ID?
Show answerA unique identifier that the server uses to look up and retrieve session data associated with a specific user.
What is JWT?
Show answerJSON Web Token: a compact, self-contained token that encodes claims about a user in JSON format.
What are the three parts of a JWT, in order?
Show answerHeader (token type and algorithm), Payload (claims), Signature (cryptographic verification).
What does a JWT header contain?
Show answerThe token type (usually JWT) and the signing algorithm (such as HS256 or RS256).
What does a JWT payload contain?
Show answerClaims: statements about the subject, encoded as JSON key-value pairs.
What does a JWT signature do?
Show answerIt cryptographically verifies that the token has not been tampered with and confirms the issuer.
What is a claim in JWT?
Show answerA statement about the subject, such as the user's identity, role, permissions, or expiration time.
What does the sub claim represent in JWT?
Show answerThe subject: the principal entity (usually the user) that the token is about.
What does the aud claim represent in JWT?
Show answerThe audience: the intended recipient or service that should accept the token.
What does the exp claim represent in JWT?
Show answerThe expiration time: a timestamp after which the token is no longer valid.

25 more cards in the app

Study this set free