You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/security/authentication/configure-jwt-bearer-authentication.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,17 +108,17 @@ OpenID Connect (OIDC) and OAuth 2.0 provide standardized, secure frameworks for
108
108
109
109
## Implementing JWT bearer token authentication
110
110
111
-
The **Microsoft.AspNetCore.Authentication.JwtBearer** Nuget package can be used to validate the JWT bearer tokens.
111
+
The [Microsoft.AspNetCore.Authentication.JwtBearer](https://www.nuget.org/packages/Microsoft.AspNetCore.Authentication.JwtBearer) Nuget package can be used to validate the JWT bearer tokens.
112
112
113
-
JWT bearer tokens should be fully validated in an API.
113
+
JWT bearer tokens should be fully validated in an API. The following should be validated:
114
114
115
-
* The signature should be validated for trust and integrity, i.e. the token was created by the defined secure token service and the token was not tampered with.
116
-
* The Issuer claim should be validated and should have the expected value.
117
-
* The Audience claim should be validated and should have the expected value.
118
-
* The token expiration claim should be validated.
119
-
* The token type should be validated. (Required in RFC 9068, "at+jwt")
115
+
* Signature, for trust and integrity. This ensures the token was created by the designated secure token service and has not been tampered with.
116
+
*Issuer claim with the expected value.
117
+
*Audience claim with the expected value.
118
+
* Token expiration.
119
+
* Token type. Required in [RFC 9068](https://datatracker.ietf.org/doc/rfc9068/) (`"application/at+jwt"`)
120
120
121
-
The following claims are required for OAuth 2.0 access tokens: iss, exp, aud, sub, client_id, iat, jti.
121
+
The following claims are required for OAuth 2.0 access tokens: `iss`, `exp`, `aud`, `sub`, `client_id`, `iat, and`jti`.
122
122
123
123
If any of these claims or values are incorrect, the API should return a 401 response.
0 commit comments