Class IdentityProviderResult<TDetails>

Namespace
Cratis.Arc.Identity
Assembly
Cratis.Arc.Core.dll

Represents the result of providing identity with strongly typed details.

public record IdentityProviderResult<TDetails> : IEquatable<IdentityProviderResult<TDetails>>

Type Parameters

TDetails

Type of the details.

Inheritance
IdentityProviderResult<TDetails>
Implements
Inherited Members
Extension Methods

Constructors

IdentityProviderResult(IdentityId, IdentityName, bool, bool, IEnumerable<string>, TDetails)

Represents the result of providing identity with strongly typed details.

public IdentityProviderResult(IdentityId Id, IdentityName Name, bool IsAuthenticated, bool IsAuthorized, IEnumerable<string> Roles, TDetails Details)

Parameters

Id IdentityId

Unique identifier for the identity.

Name IdentityName

Name of the identity.

IsAuthenticated bool

Indicates whether the user is authenticated.

IsAuthorized bool

Indicates whether the user is authorized.

Roles IEnumerable<string>

The roles the identity is in.

Details TDetails

The resolved details.

IdentityProviderResult(IdentityProviderResult<TDetails>)

protected IdentityProviderResult(IdentityProviderResult<TDetails> original)

Parameters

original IdentityProviderResult<TDetails>

Properties

Details

The resolved details.

public TDetails Details { get; init; }

Property Value

TDetails

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Id

Unique identifier for the identity.

public IdentityId Id { get; init; }

Property Value

IdentityId

IsAuthenticated

Indicates whether the user is authenticated.

public bool IsAuthenticated { get; init; }

Property Value

bool

IsAuthorized

Indicates whether the user is authorized.

public bool IsAuthorized { get; init; }

Property Value

bool

Name

Name of the identity.

public IdentityName Name { get; init; }

Property Value

IdentityName

Roles

The roles the identity is in.

public IEnumerable<string> Roles { get; init; }

Property Value

IEnumerable<string>

Methods

Deconstruct(out IdentityId, out IdentityName, out bool, out bool, out IEnumerable<string>, out TDetails)

public void Deconstruct(out IdentityId Id, out IdentityName Name, out bool IsAuthenticated, out bool IsAuthorized, out IEnumerable<string> Roles, out TDetails Details)

Parameters

Id IdentityId
Name IdentityName
IsAuthenticated bool
IsAuthorized bool
Roles IEnumerable<string>
Details TDetails

Equals(IdentityProviderResult<TDetails>?)

public virtual bool Equals(IdentityProviderResult<TDetails>? other)

Parameters

other IdentityProviderResult<TDetails>

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(IdentityProviderResult<TDetails>?, IdentityProviderResult<TDetails>?)

public static bool operator ==(IdentityProviderResult<TDetails>? left, IdentityProviderResult<TDetails>? right)

Parameters

left IdentityProviderResult<TDetails>
right IdentityProviderResult<TDetails>

Returns

bool

operator !=(IdentityProviderResult<TDetails>?, IdentityProviderResult<TDetails>?)

public static bool operator !=(IdentityProviderResult<TDetails>? left, IdentityProviderResult<TDetails>? right)

Parameters

left IdentityProviderResult<TDetails>
right IdentityProviderResult<TDetails>

Returns

bool