Class IdentityServerUser
- Namespace
- Fdyay.IdentityServer
- Assembly
- Fdyay.IdentityServer.Core.dll
A user being signed in to this server's session, as a login page describes them.
public class IdentityServerUser
- Inheritance
-
IdentityServerUser
- Inherited Members
Remarks
Duende 8.0.1's, measured, for a host's own login page: await HttpContext.SignInAsync(new IdentityServerUser(sub))
signs it in to the session's scheme. CreatePrincipal() is the principal that becomes.
Constructors
IdentityServerUser(string)
Creates a user with the given subject identifier, which becomes the sub claim.
public IdentityServerUser(string subjectId)
Parameters
subjectIdstringThe user's subject identifier. Must not be null, empty or whitespace.
Exceptions
- ArgumentException
subjectIdis null, empty or whitespace.
Properties
AdditionalClaims
Any other claims the session should carry.
public ICollection<Claim> AdditionalClaims { get; set; }
Property Value
AuthenticationMethods
The amr claims: how the user authenticated.
public ICollection<string> AuthenticationMethods { get; set; }
Property Value
AuthenticationTime
The auth_time claim. The time of the sign-in when not set.
public DateTime? AuthenticationTime { get; set; }
Property Value
DisplayName
The name claim, when there is one.
public string? DisplayName { get; set; }
Property Value
IdentityProvider
The idp claim: which provider the user signed in with. local when not set.
public string? IdentityProvider { get; set; }
Property Value
SubjectId
The user's subject identifier, the sub claim. Required.
public string SubjectId { get; }
Property Value
Tenant
The tenant claim, when there is one.
public string? Tenant { get; set; }
Property Value
Methods
CreatePrincipal()
The principal this user signs in as.
public ClaimsPrincipal CreatePrincipal()
Returns
Remarks
Duende's claims in Duende's order — sub, name, idp, tenant, auth_time, one amr
per method, then the additional claims — with duplicates removed, in one identity whose name and role claims are
name and role. Its authentication type is this server's name where Duende's is its own.