Class UserObjectIdentifier
Default IUserObjectIdentifier: the identifier is the value of the first claim whose type is one of the configured ClaimsIdentifierOption claim types (by default the object identifier claims).
[Export(typeof(IUserObjectIdentifier))]
[Shared]
public class UserObjectIdentifier : IUserObjectIdentifier
- Inheritance
-
UserObjectIdentifier
- Implements
- Inherited Members
Constructors
UserObjectIdentifier(IOptions<ClaimsIdentifierOption>, ILogger<UserObjectIdentifier>)
Initializes a new instance of the UserObjectIdentifier class.
public UserObjectIdentifier(IOptions<ClaimsIdentifierOption> identifierOptions, ILogger<UserObjectIdentifier> logger)
Parameters
identifierOptionsIOptions<ClaimsIdentifierOption>The claim types that identify a user.
loggerILogger<UserObjectIdentifier>The logger.
Methods
Getidentifier(ClaimsIdentity)
Gets the identifier of the user.
public string? Getidentifier(ClaimsIdentity identity)
Parameters
identityClaimsIdentityThe identity of the user.