Class IdentityProviderResult
- Namespace
- Cratis.Arc.Identity
- Assembly
- Cratis.Arc.Core.dll
Represents the result of providing identity.
public record IdentityProviderResult : IEquatable<IdentityProviderResult>
- Inheritance
-
IdentityProviderResult
- Implements
- Inherited Members
- Extension Methods
Constructors
IdentityProviderResult(IdentityId, IdentityName, bool, bool, IEnumerable<string>, object)
Represents the result of providing identity.
public IdentityProviderResult(IdentityId Id, IdentityName Name, bool IsAuthenticated, bool IsAuthorized, IEnumerable<string> Roles, object Details)
Parameters
IdIdentityIdUnique identifier for the identity.
NameIdentityNameName of the identity.
IsAuthenticatedboolIndicates whether the user is authenticated.
IsAuthorizedboolIndicates whether the user is authorized.
RolesIEnumerable<string>The roles the identity is in.
DetailsobjectThe resolved details.
IdentityProviderResult(IdentityProviderResult)
protected IdentityProviderResult(IdentityProviderResult original)
Parameters
originalIdentityProviderResult
Fields
Anonymous
Represents an anonymous identity result.
public static readonly IdentityProviderResult Anonymous
Field Value
Unauthorized
Represents an unauthorized identity result.
public static readonly IdentityProviderResult Unauthorized
Field Value
Properties
Details
The resolved details.
public object Details { get; init; }
Property Value
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
Id
Unique identifier for the identity.
public IdentityId Id { get; init; }
Property Value
IsAuthenticated
Indicates whether the user is authenticated.
public bool IsAuthenticated { get; init; }
Property Value
IsAuthorized
Indicates whether the user is authorized.
public bool IsAuthorized { get; init; }
Property Value
Name
Name of the identity.
public IdentityName Name { get; init; }
Property Value
Roles
The roles the identity is in.
public IEnumerable<string> Roles { get; init; }
Property Value
Methods
Deconstruct(out IdentityId, out IdentityName, out bool, out bool, out IEnumerable<string>, out object)
public void Deconstruct(out IdentityId Id, out IdentityName Name, out bool IsAuthenticated, out bool IsAuthorized, out IEnumerable<string> Roles, out object Details)
Parameters
IdIdentityIdNameIdentityNameIsAuthenticatedboolIsAuthorizedboolRolesIEnumerable<string>Detailsobject
Equals(IdentityProviderResult?)
public virtual bool Equals(IdentityProviderResult? other)
Parameters
otherIdentityProviderResult
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(IdentityProviderResult?, IdentityProviderResult?)
public static bool operator ==(IdentityProviderResult? left, IdentityProviderResult? right)
Parameters
leftIdentityProviderResultrightIdentityProviderResult
Returns
operator !=(IdentityProviderResult?, IdentityProviderResult?)
public static bool operator !=(IdentityProviderResult? left, IdentityProviderResult? right)
Parameters
leftIdentityProviderResultrightIdentityProviderResult