Tm1Identity
import io.skipcheck.tm1.client.session.Tm1Identity; 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 throughTM1-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 static | The pool's own credentials, with no impersonation. |
impersonating static | The pool's credentials, acting as TM1 user user. |
withCredentials static | A user logging in with their own credentials. |
kind | What kind of identity this is. |
name | The user's name, as given; empty for the service account. |
authenticator | The user's own credentials, for Tm1Identity.Kind.OWN_CREDENTIALS. |
equals | |
hashCode | |
toString |
serviceAccount
staticstatic Tm1Identity serviceAccount()The pool's own credentials, with no impersonation.
Returns
- the identity
impersonating
staticstatic Tm1Identity impersonating(String user) The pool's credentials, acting as TM1 user user. The pool's credentials
must be an administrator's or a data administrator's, and administrators can't be
impersonated; see Builder.impersonate.
Parameters
user- the TM1 user to act as
Returns
- the identity
Throws
IllegalArgumentException- if
useris blank or has a control character
withCredentials
staticstatic Tm1Identity withCredentials(String name, Tm1Authenticator authenticator)A user logging in with their own credentials.
Parameters
name- who the credentials belong to, for the pool's key and for logs, 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
Returns
- the identity
kind
Tm1Identity.Kind kind()What kind of identity this is.
Returns
- the kind
name
String name()The user's name, as given; empty for the service account.
Returns
- the name
authenticator
Optional<Tm1Authenticator> authenticator() The user's own credentials, for Tm1Identity.Kind.OWN_CREDENTIALS.
Returns
- the authenticator, or empty for the other kinds
equals
boolean equals(Object other)hashCode
int hashCode()toString
String toString()Also in the Javadoc.