Table of Contents

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

string

FailureReason

Why the sign-in was refused, for the failure event. Not shown to the user.

public string? FailureReason { get; }

Property Value

string

SubjectId

The signed-in user's subject id.

public string? SubjectId { get; }

Property Value

string

Succeeded

Whether the user is now signed in.

[MemberNotNullWhen(true, new string[] { "SubjectId", "Username" })]
public bool Succeeded { get; }

Property Value

bool

Username

The signed-in user's username.

public string? Username { get; }

Property Value

string

Methods

Failure(string)

A sign-in that was refused.

public static UserSignInResult Failure(string reason)

Parameters

reason string

Why, 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

subjectId string

The signed-in user's subject id.

username string

The signed-in user's username.

displayName string

The user's name, for the success event; null when the accounts keep none.

Returns

UserSignInResult

A result whose Succeeded is true.