skipcheck

TM1 client · Docs · Sessions and logins

Tm1Identity

using Skipcheck.Tm1.Client.Session;

Who a session is: the identity a Tm1SessionPool keys its sessions by. In TM1 the identity is fixed when the session logs in, so one identity is one session.

  • ServiceAccount: the pool's own credentials, as they are.
  • Impersonating: the pool's credentials, acting as a TM1 user through TM1-Impersonate.
  • WithCredentials: a user's own credentials, such as their CAM passport.

Two identities are equal when they're the same kind and their names match as TM1 matches user names, ignoring case and spaces, so Impersonating("Alice") and Impersonating("alice") share a session.

For a user's own credentials, the credentials must be equal too. A name is only what the caller says, and it's TM1 that checks credentials, at login: if the name alone found the session, anyone giving a logged-in user's name would get that user's session without TM1 ever seeing what they offered, and a corrected password or a renewed passport would never be used. So different credentials for the same name get a session of their own, and TM1 accepts or refuses them. See Tm1Authenticator for which authenticators are equal to one another.

Members

ServiceAccount staticThe pool's service account itself.
Impersonating staticThe service account impersonating user, which needs TM1 to allow it to impersonate (an admin, or the user's Impersonation right); see Tm1SessionBuilder.Impersonate.
WithCredentials staticA user with their own credentials; name says who they belong to, for the pool's key and for logs.
Kind propertyWhat kind of identity this is.
Name propertyThe user's name, as given (empty for the service account).
Authenticator propertyThe user's own credentials, for IdentityKind.OwnCredentials.
Equals
Equals
GetHashCode
ToString

ServiceAccount

static
Tm1Identity ServiceAccount()

The pool's service account itself.

Impersonating

static
Tm1Identity Impersonating(string user)

The service account impersonating user, which needs TM1 to allow it to impersonate (an admin, or the user's Impersonation right); see Tm1SessionBuilder.Impersonate.

Throws

ArgumentException
user is blank or has a control character.

WithCredentials

static
Tm1Identity WithCredentials(string name, Tm1Authenticator authenticator)

A user with their own credentials; name says who they belong to, for the pool's key and for logs.

Parameters

name
Who the credentials belong to, such as the user name.
authenticator
Their credentials. Pass one that is equal each time, or the same object: an authenticator the pool hasn't seen for this name gets a new session.

Kind

property
IdentityKind Kind

What kind of identity this is.

Name

property
string Name

The user's name, as given (empty for the service account).

Authenticator

property
Tm1Authenticator? Authenticator

The user's own credentials, for IdentityKind.OwnCredentials.

Equals

bool Equals(Tm1Identity? other)

Equals

bool Equals(object? obj)

GetHashCode

int GetHashCode()

ToString

string ToString()