Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
interface Duende.​IdentityServer.​Services.​IProfileService
Assembly: Duende.IdentityServer
Allows IdentityServer to connect to your user and profile store. Implement this interface to control which claims are included in tokens and at the UserInfo endpoint, and to determine whether a user is currently allowed to obtain tokens (e.g. if the account has been deactivated).
Methods
GetProfileDataAsync​(Models.​ProfileDataRequestContext context,
System.​Threading.​CancellationToken ct)
Called whenever claims about the user are requested, for example during token creation
or when the UserInfo endpoint is called. Implementations should populate
<see cref="P:Duende.IdentityServer.Models.ProfileDataRequestContext.IssuedClaims" /> with the claims that should be included.
context
The context describing the request, including the user's <c>Subject</c> , the requesting <c>Client</c> ,
the <c>RequestedClaimTypes</c> derived from the requested scopes, and the <c>Caller</c> identifier
indicating whether the request originates from a token endpoint, UserInfo endpoint, etc.
ct
The cancellation token.
IsActiveAsync​(Models.​IsActiveContext context,
System.​Threading.​CancellationToken ct)
Called whenever IdentityServer needs to determine whether the user is valid or active,
for example during token issuance or validation. Implementations should set
<see cref="P:Duende.IdentityServer.Models.IsActiveContext.IsActive" /> to <c>false</c> if the user should not be
allowed to obtain tokens (e.g. the account has been deactivated since the user logged in).
context
The context describing the request, including the user's <c>Subject</c> , the requesting <c>Client</c> ,
and the <c>Caller</c> identifier. Set <c>context.IsActive</c> to indicate whether the user is allowed
to obtain tokens.
ct
The cancellation token.