CADCUserInfo

pydantic model gafaelfawr.models.userinfo.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": [
            {
               "$ref": "#/$defs/Timestamp"
            },
            {
               "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": "For now, Gafaelfawr uses the username for this field as well, even though this is not entirely correct in the presence of username changes.",
         "examples": [
            "someuser"
         ],
         "title": "Unique identifier",
         "type": "string"
      }
   },
   "$defs": {
      "Timestamp": {
         "format": "date-time",
         "type": "string"
      }
   },
   "required": [
      "preferred_username",
      "sub"
   ]
}

Fields:
field exp: Timestamp | 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: str [Required]

For now, Gafaelfawr uses the username for this field as well, even though this is not entirely correct in the presence of username changes.