Tm1Identity
from skipcheck_tm1 import 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.
service_account: the pool's own credentials, as they are.impersonating: the pool's credentials, acting as a TM1 user throughTM1-Impersonate.with_credentials: 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 Authenticator for which
authenticators are equal to one another.
Members
__init__ constructor | |
service_account static | The account the session settings log in with. |
impersonating static | The service account, acting as user (TM1-Impersonate). |
with_credentials static | A user who logs in with credentials of their own. |
kind property | What kind of identity this is. |
name property | The user's name; empty for the service account. |
authenticator property | The identity's own credentials, if it has them. |
apply_to | Session settings for this identity, from the pool's (Java's applyTo). |
__init__
constructor__init__(kind: Tm1Identity.Kind, name: str, authenticator: Authenticator | None)service_account
staticservice_account() -> Tm1IdentityThe account the session settings log in with.
impersonating
staticimpersonating(user: str) -> Tm1IdentityThe service account, acting as user (TM1-Impersonate). Refuses a blank name and one with a control character.
with_credentials
staticwith_credentials(name: str, authenticator: Authenticator) -> Tm1IdentityA user who logs in with credentials of their own. name is who they belong to, for the pool's key and for logs. Pass an authenticator that is equal each time, or the same object: one the pool hasn't seen for this name gets a new session.
kind
propertykind: Tm1Identity.KindWhat kind of identity this is.
name
propertyname: strThe user's name; empty for the service account.
authenticator
propertyauthenticator: Authenticator | NoneThe identity's own credentials, if it has them.
apply_to
apply_to(settings: dict[str, Any]) -> dict[str, Any]Session settings for this identity, from the pool's (Java's applyTo).