Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure JWT bearer authentication in ASP.NET Core #34310

Merged
merged 152 commits into from
Jan 19, 2025
Merged
Changes from 1 commit
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
f261723
Add structure
damienbod Dec 6, 2024
93d129c
Add some standards
damienbod Dec 6, 2024
927b768
Add some standards
damienbod Dec 6, 2024
c4bb67e
Access tokens
damienbod Dec 7, 2024
9d26a99
tokens tokens tokens
damienbod Dec 7, 2024
8a73088
Add some more docs
damienbod Dec 7, 2024
d77112e
Add more docs
damienbod Dec 7, 2024
70772e3
Add link
damienbod Dec 7, 2024
78eb074
Init sample
damienbod Dec 7, 2024
405c8af
Install Microsoft.AspNetCore.Authentication.JwtBearer
damienbod Dec 7, 2024
16ea594
Init JWT
damienbod Dec 7, 2024
a7dac23
Update sample
damienbod Dec 7, 2024
85b772b
code clean up
damienbod Dec 7, 2024
5a1e146
Update docs
damienbod Dec 7, 2024
bbff431
more docs
damienbod Dec 7, 2024
c1ab204
More docs
damienbod Dec 7, 2024
bded7a1
Add a note about testing
damienbod Dec 7, 2024
6b9fe20
small improvement
damienbod Dec 7, 2024
24d4b2f
Add example link
damienbod Dec 7, 2024
fc04ba0
Fix the link
damienbod Dec 7, 2024
f5dfefc
more docs
damienbod Dec 7, 2024
1e4e57f
Add downstream APIs
damienbod Dec 8, 2024
6a9d5de
test tools
damienbod Dec 8, 2024
cfc045f
More docs
damienbod Dec 8, 2024
ba793b5
Add more docs
damienbod Dec 8, 2024
dcf6ba8
Add doc
damienbod Dec 8, 2024
5b42a01
clean up links
damienbod Dec 8, 2024
ef3270f
Add auth attribute for docs
damienbod Dec 8, 2024
c229064
Use the auth
damienbod Dec 8, 2024
5190fb5
typo
damienbod Dec 8, 2024
95262c1
typo
damienbod Dec 8, 2024
a58ad12
fix links
damienbod Dec 8, 2024
f970f1d
fix links
damienbod Dec 8, 2024
1ad7588
TOC update
damienbod Dec 8, 2024
6d7f78f
improve text
damienbod Dec 8, 2024
7217670
typo
damienbod Dec 8, 2024
6300b6b
typo
damienbod Dec 8, 2024
dadfdf8
typo
damienbod Dec 8, 2024
651175d
typo
damienbod Dec 8, 2024
00c4039
typo
damienbod Dec 8, 2024
be10b22
text
damienbod Dec 8, 2024
3c8eeeb
Improve the text
damienbod Dec 8, 2024
eb3147a
typo
damienbod Dec 8, 2024
907fe5c
text
damienbod Dec 8, 2024
4ea04f9
typo
damienbod Dec 8, 2024
0fc2a2a
text
damienbod Dec 8, 2024
f300c28
space
damienbod Dec 8, 2024
b7b810a
typo
damienbod Dec 8, 2024
1ee71ff
typo
damienbod Dec 8, 2024
0a1e65a
Improve text
damienbod Dec 8, 2024
9007743
typo
damienbod Dec 8, 2024
59b33d7
Improve text
damienbod Dec 8, 2024
148a296
typo
damienbod Dec 8, 2024
e5d8087
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 8, 2025
e459c53
Fix Token types
damienbod Jan 8, 2025
a308996
Fix Access tokens: comment
damienbod Jan 8, 2025
dba8d7b
Fix Application access tokens and delegated access tokens
damienbod Jan 8, 2025
583e6f0
Fix: When requesting or creating an access token, an app, or an app a…
damienbod Jan 8, 2025
ee760ca
Fix: We recommend using delegated user access tokens whenever a user …
damienbod Jan 8, 2025
9d13515
Fix comment: ID tokens are security tokens that confirm a user’s succ…
damienbod Jan 8, 2025
bca2d50
Fix: ID tokens ***should never*** be used to access APIs.
damienbod Jan 8, 2025
bd7cd9c
Fix comments
damienbod Jan 8, 2025
db708d4
Update texts
damienbod Jan 8, 2025
4682a82
fix
damienbod Jan 9, 2025
b544c19
fix
damienbod Jan 9, 2025
ec6ece5
Fix text
damienbod Jan 9, 2025
c058091
better link for claims in an AT
damienbod Jan 9, 2025
6346f1f
remove language
damienbod Jan 9, 2025
0d82ca8
Improve text
damienbod Jan 9, 2025
a8b7d1c
fixed
damienbod Jan 9, 2025
a85639d
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 10, 2025
6d6e63e
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 10, 2025
85ecdc7
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 10, 2025
445a6e2
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 10, 2025
7f4bd29
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 10, 2025
ec1e833
Use Curl
damienbod Jan 10, 2025
80e06b9
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 10, 2025
599cced
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 10, 2025
446fab2
fix
damienbod Jan 10, 2025
4b20e9e
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 10, 2025
01daa8a
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 10, 2025
9a70050
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
9e703a4
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
ecd4009
Never create an access token from a username/password request
damienbod Jan 11, 2025
83eed3f
Use cookies
damienbod Jan 11, 2025
4747490
Update text
damienbod Jan 11, 2025
c636a3d
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
85144f3
fixed
damienbod Jan 11, 2025
0b91e4f
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
71e552a
link: For more information, see [[Microsoft identity platform and OAu…
damienbod Jan 11, 2025
3189af2
Merge branch 'damienbod/jwt-bearer-authn' of https://github.com/damie…
damienbod Jan 11, 2025
503c47c
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
6816244
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
ce1ab51
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
a04dd9c
link
damienbod Jan 11, 2025
b2ce565
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
b040ba9
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
55be035
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
9a5e4d6
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
dde1c3d
remove summary
damienbod Jan 11, 2025
6f232bc
Merge branch 'damienbod/jwt-bearer-authn' of https://github.com/damie…
damienbod Jan 11, 2025
017e922
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
ec70cc7
Update example
damienbod Jan 11, 2025
0f1700c
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
ff5e56a
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
e5c11a0
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
884cc5e
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
e84afae
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
cb0bd82
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
7b17169
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
8cdab50
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
1ad05fe
Make doc provider neutral
damienbod Jan 11, 2025
5b57ce5
fix
damienbod Jan 11, 2025
b8e859a
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
7d69645
fix tokens
damienbod Jan 11, 2025
6d5ef1a
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
f2dfd1b
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
7f15428
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
d2a1ffd
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
499eefa
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
0341748
space
damienbod Jan 11, 2025
3f24700
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
a66f8fe
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
9336edc
Update to JsonWebTokenHandler
damienbod Jan 11, 2025
977442e
Add a link
damienbod Jan 11, 2025
f7d1ca6
add a space
damienbod Jan 11, 2025
1adde7c
Fix links
damienbod Jan 11, 2025
c0d9ef4
Fix docs
damienbod Jan 11, 2025
9034f5b
Fix Link
damienbod Jan 11, 2025
3fef468
fix link
damienbod Jan 11, 2025
297022b
Fix link, try 2
damienbod Jan 11, 2025
e84444d
docs
damienbod Jan 11, 2025
7f51238
Update policyschemes
damienbod Jan 11, 2025
0d4cd53
lines
damienbod Jan 11, 2025
080393e
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
acc6657
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 11, 2025
6e47529
Update text
damienbod Jan 11, 2025
d868a85
Merge branch 'damienbod/jwt-bearer-authn' of https://github.com/damie…
damienbod Jan 11, 2025
05f00a8
Add a reference to the 401 RFC
damienbod Jan 11, 2025
9f69e6c
update text
damienbod Jan 11, 2025
e2dd13f
404 note
damienbod Jan 11, 2025
6b259f4
Minimal APIs
damienbod Jan 11, 2025
4b8c82b
code clean up
damienbod Jan 11, 2025
e3232f4
line
damienbod Jan 12, 2025
73449ff
Add a summary
damienbod Jan 13, 2025
ce2b865
Some fixes
damienbod Jan 15, 2025
69f8103
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 17, 2025
a0faf06
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 17, 2025
66902cd
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 17, 2025
162f69d
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 18, 2025
00cf410
Update aspnetcore/security/authentication/configure-jwt-bearer-authen…
damienbod Jan 18, 2025
eb63d3c
grammer
damienbod Jan 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add more docs
damienbod committed Dec 7, 2024
commit d77112ea909235d1ae6889a35f515a779fb5ff45
Original file line number Diff line number Diff line change
@@ -78,9 +78,7 @@ A 403 forbidden response is normally returned when a business permission is miss

## How OIDC/OAuth fits into this?

### OIDC and user access tokens

### OAuth application tokens
When using access tokens, only the access token is validated on the API. The process of acquiring the access token is unspecified. OpenID Connect and OAuth specify standards on how to acquire access tokens in a safe way. This process is different for every type of application. It is complicated to implement this in a safe way. This is why it is recommended to use one of the standards to create access tokens. OpenID Connect is used to create access tokens for an application and a user. These access tokens are user delegated access tokens. In a web application, a confidential OpenID Connect code flow using PKCE is the recommended way to implement this. If the application has no user, OAuth client credentials can be used to acquire an application access token.

## Examples with code snippets