Class UserSignInResult
- Namespace
- Fdyay.IdentityServer.Services
- Assembly
- Fdyay.IdentityServer.AspNetCore.dll
A sign-in that happened, naming the user, or one that did not, saying why.
public sealed class UserSignInResult
- Inheritance
-
UserSignInResult
- Inherited Members
Properties
DisplayName
The signed-in user's name, for the success event, if the accounts keep one.
public string? DisplayName { get; }
Property Value
FailureReason
Why the sign-in was refused, for the failure event. Not shown to the user.
public string? FailureReason { get; }
Property Value
SubjectId
The signed-in user's subject id.
public string? SubjectId { get; }
Property Value
Succeeded
Whether the user is now signed in.
[MemberNotNullWhen(true, new string[] { "SubjectId", "Username" })]
public bool Succeeded { get; }
Property Value
Username
The signed-in user's username.
public string? Username { get; }
Property Value
Methods
Failure(string)
A sign-in that was refused.
public static UserSignInResult Failure(string reason)
Parameters
reasonstringWhy, for the failure event; not shown to the user.
Returns
- UserSignInResult
A result whose Succeeded is false.
Success(string, string, string?)
A sign-in that succeeded.
public static UserSignInResult Success(string subjectId, string username, string? displayName)
Parameters
subjectIdstringThe signed-in user's subject id.
usernamestringThe signed-in user's username.
displayNamestringThe user's name, for the success event; null when the accounts keep none.
Returns
- UserSignInResult
A result whose Succeeded is true.