Table of Contents

Class Identity

Namespace
Cratis.Chronicle.Identities
Assembly
Cratis.Chronicle.dll

Represents an identity of something that is responsible for causing a state change.

public record Identity : IEquatable<Identity>
Inheritance
Identity
Implements
Inherited Members

Remarks

An identity can be a user, a system, a service or anything else that can be identified.

Constructors

Identity(string, string, string, Identity?)

Represents an identity of something that is responsible for causing a state change.

public Identity(string Subject, string Name, string UserName = "", Identity? OnBehalfOf = null)

Parameters

Subject string

The identifier of the identity, referred to as subject.

Name string

Name of the identity.

UserName string

Optional username, defaults to empty string.

OnBehalfOf Identity

Optional behalf of Identity.

Remarks

An identity can be a user, a system, a service or anything else that can be identified.

Fields

NotSet

The identity used when not set.

public static readonly Identity NotSet

Field Value

Identity

System

The identity used when the system is the cause.

public static readonly Identity System

Field Value

Identity

Unknown

The identity used when the identity is not known.

public static readonly Identity Unknown

Field Value

Identity

Properties

Name

Name of the identity.

public string Name { get; init; }

Property Value

string

OnBehalfOf

Optional behalf of Identity.

public Identity? OnBehalfOf { get; init; }

Property Value

Identity

Subject

The identifier of the identity, referred to as subject.

public string Subject { get; init; }

Property Value

string

UserName

Optional username, defaults to empty string.

public string UserName { get; init; }

Property Value

string