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
SubjectstringThe stable identity subject, for example the OIDC
subclaim.DisplayNamestringThe human-readable name, when the authentication provider supplies one.
RolesIReadOnlyList<string>The roles granted to the identity.
ScopesIReadOnlyList<string>The OAuth2 scopes granted to the identity.
IdentityProviderstringThe 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
IdentityProvider
The authentication provider that established the identity.
public string IdentityProvider { get; init; }
Property Value
Roles
The roles granted to the identity.
public IReadOnlyList<string> Roles { get; init; }
Property Value
Scopes
The OAuth2 scopes granted to the identity.
public IReadOnlyList<string> Scopes { get; init; }
Property Value
Subject
The stable identity subject, for example the OIDC sub claim.
public string Subject { get; init; }