Class DefaultProfileService
- Namespace
- Fdyay.IdentityServer.Services
- Assembly
- Fdyay.IdentityServer.Core.dll
Default profile service: issues the subject's claims filtered by the requested claim types.
public class DefaultProfileService : IProfileService
- Inheritance
-
DefaultProfileService
- Implements
- Inherited Members
Remarks
Both hooks are virtual because deriving from this and overriding one of them is the ordinary way a host enriches its tokens — it inherits the filtering here and adds its own claims on top, rather than reimplementing IProfileService from scratch and losing that filtering by omission.
Constructors
DefaultProfileService()
A profile service that logs nowhere.
public DefaultProfileService()
DefaultProfileService(ILogger<DefaultProfileService>)
A profile service that logs the claims it issues to logger.
public DefaultProfileService(ILogger<DefaultProfileService> logger)
Parameters
loggerILogger<DefaultProfileService>Where the issued claims are logged; a derived service may pass its own logger.
Methods
GetProfileDataAsync(ProfileDataRequestContext, CancellationToken)
Adds the requested claims to IssuedClaims.
public virtual Task GetProfileDataAsync(ProfileDataRequestContext context, CancellationToken cancellationToken = default)
Parameters
contextProfileDataRequestContextcancellationTokenCancellationToken
Returns
Remarks
Issues the subject's own claims whose types were requested, and none when none were.
IsActiveAsync(IsActiveContext, CancellationToken)
Determines whether the subject is still active and allowed to receive tokens.
public virtual Task IsActiveAsync(IsActiveContext context, CancellationToken cancellationToken = default)
Parameters
contextIsActiveContextcancellationTokenCancellationToken
Returns
Remarks
Always active: sets IsActive to true.