Authorization/authentication in APIs (JWT, OAuth)?
- Use JWT Bearer Tokens for stateless auth:
services.AddAuthentication(JwtBearerDefaults.AuthenticationSch
eme)
.AddJwtBearer(options => { ... });
- Secure endpoints with:
[Authorize(Roles = "Admin")]
- OAuth supported via IdentityServer, Azure AD, or external
providers.