TokenUserInfo#
- class gafaelfawr.models.token.TokenUserInfo(**data)#
Bases:
BaseModelThe information about a user stored with their token.
If information is stored with the token, it overrides information from other sources such as LDAP. Fields that should be dynamically retrieved from LDAP should be omitted or set to
None.- Parameters:
data (
Any) –
Methods Summary
Convert to a dictionary for logging purposes.
Methods Documentation
- to_userinfo_dict()#
Convert to a dictionary for logging purposes.
This method converts only the
TokenUserInfoportion of a token to a dictionary for logging purposes, excluding theusernamefield (which is logged separately). It’s used when logging creation of new tokens to make a record of the user identity information included in the token (as opposed to retrieved dynamically from other sources such as LDAP or Firestore).- Returns:
Dictionary of information, roughly equivalent to calling
dict(exclude_none=True)on theTokenUserInfoobject, but ensuring that only its data is included even if called on a subclass such asTokenData.- Return type: