Skip to content
Discussion options

You must be logged in to vote

Since you're calling context.RejectPrincipal(); in the ValidatePrincipal method, the end result of the underlying AuthenticateAsync call will have no ClaimsPrincipal available when the current user is being retrieved from the IUserSession service.

We're wondering what the use case is behind what you're trying to achieve, because there may be better suited places to check the specific condition and rejecting the user or access to the /authorize endpoint.

One specific way would be to implement a custom authorize request validator, where you can reject the authorize request based on your conditions, and still decide to call SignOutAsync when necessary.

We also have an IProfileService which e…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@janssensjeroen
Comment options

@wcabus
Comment options

@janssensjeroen
Comment options

Answer selected by janssensjeroen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants