Table of Contents

Class CurrentUser

Namespace
OpenShell
Assembly
OpenShell.Sdk.dll

The authenticated caller.

public sealed record CurrentUser : IEquatable<CurrentUser>
Inheritance
CurrentUser
Implements
Inherited Members

Constructors

CurrentUser(string, string, IReadOnlyList<string>, IReadOnlyList<string>, string)

The authenticated caller.

public CurrentUser(string Subject, string DisplayName, IReadOnlyList<string> Roles, IReadOnlyList<string> Scopes, string IdentityProvider)

Parameters

Subject string

The stable identity subject, for example the OIDC sub claim.

DisplayName string

The human-readable name, when the authentication provider supplies one.

Roles IReadOnlyList<string>

The roles granted to the identity.

Scopes IReadOnlyList<string>

The OAuth2 scopes granted to the identity.

IdentityProvider string

The authentication provider that established the identity.

Properties

DisplayName

The human-readable name, when the authentication provider supplies one.

public string DisplayName { get; init; }

Property Value

string

IdentityProvider

The authentication provider that established the identity.

public string IdentityProvider { get; init; }

Property Value

string

Roles

The roles granted to the identity.

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

Property Value

IReadOnlyList<string>

Scopes

The OAuth2 scopes granted to the identity.

public IReadOnlyList<string> Scopes { get; init; }

Property Value

IReadOnlyList<string>

Subject

The stable identity subject, for example the OIDC sub claim.

public string Subject { get; init; }

Property Value

string