Skip to content

implements token validation and error handling for invalid issuer#12

Merged
https-richardy merged 2 commits into
masterfrom
feature/11-dynamic-issuer-validation-for-admin-resources
Mar 29, 2026
Merged

implements token validation and error handling for invalid issuer#12
https-richardy merged 2 commits into
masterfrom
feature/11-dynamic-issuer-validation-for-admin-resources

Conversation

@https-richardy
Copy link
Copy Markdown
Owner

@https-richardy https-richardy commented Mar 29, 2026

Introduces dynamic issuer validation in the OnTokenValidated event, comparing the token value with the current request host (scheme + host). In case of a mismatch, authentication fails and a standardized error (InvalidIssuer) is logged in HttpContext.Items. It also adds handling for invalid token formats with a specific error (InvalidTokenFormat), ensuring more consistent and traceable responses in the authentication flow.

…ent an invalid token issuer error, with a specific code and description.
… issuer in the OnTokenValidated event. Specific errors are logged in HttpContext.Items and returned in OnChallenge, enabling more detailed authentication responses.
@https-richardy https-richardy merged commit bc008dc into master Mar 29, 2026
9 of 10 checks passed
@https-richardy https-richardy deleted the feature/11-dynamic-issuer-validation-for-admin-resources branch March 29, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant