CADCUserInfo¶
- pydantic model gafaelfawr.models.token.CADCUserInfo¶
User metadata required by the CADC authentication code.
This model is hopefully temporary and will be retired by merging the CADC support with the OpenID Connect support.
- Parameters:
data (
Any
)
Show JSON schema
{ "title": "CADCUserInfo", "description": "User metadata required by the CADC authentication code.\n\nThis model is hopefully temporary and will be retired by merging the CADC\nsupport with the OpenID Connect support.", "type": "object", "properties": { "exp": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "Expiration timestamp of the token in seconds since epoch. If not present, the token never expires.", "examples": [ 1625986130 ], "title": "Expiration time" }, "preferred_username": { "description": "Username of user", "examples": [ "someuser" ], "title": "Username", "type": "string" }, "sub": { "description": "CADC code currently requires a UUID in this field. In practice, this is generated as a version 5 UUID based on a configured UUID namespace and the string representation of the user's numeric UID (thus allowing username changes if the UID is preserved.", "examples": [ "78410c93-841d-53b1-a353-6411524d149e" ], "format": "uuid", "title": "Unique identifier", "type": "string" } }, "required": [ "preferred_username", "sub" ] }
- field exp: datetime | None = None¶
Expiration timestamp of the token in seconds since epoch. If not present, the token never expires.
- field preferred_username: str [Required]¶
Username of user
- field sub: UUID [Required]¶
CADC code currently requires a UUID in this field. In practice, this is generated as a version 5 UUID based on a configured UUID namespace and the string representation of the user’s numeric UID (thus allowing username changes if the UID is preserved.