filmov
tv
How to create a WebAPI authenticated by JWT?
Показать описание
JSON Web Token (JWT) is an open standard (RFC 7519) to exchange information securely via a signed token. For example, a server could issue a token with the claim "user identified as an administrator" and provide it to the client. The client could then check the token to prove that the user is logged in as an administrator.
Personally, it is a solution that I find elegant because
- Simple to set up: a few configuration lines and the use of the [Authorize] attribute,
- Easily manage my own security rules when checking the username and password,
- Very easy to test in client applications: just add an HTTP header "Authorization: Bearer[Token]".
Personally, it is a solution that I find elegant because
- Simple to set up: a few configuration lines and the use of the [Authorize] attribute,
- Easily manage my own security rules when checking the username and password,
- Very easy to test in client applications: just add an HTTP header "Authorization: Bearer[Token]".
Комментарии