UserTokenModifyRequest

pydantic model gafaelfawr.models.token.UserTokenModifyRequest

The parameters of a user token that can be changed.

This is a separate model from UserTokenRequest because the token_name field is optional on modify requests.

Parameters:

data (Any)

Show JSON schema
{
   "title": "UserTokenModifyRequest",
   "description": "The parameters of a user token that can be changed.\n\nThis is a separate model from `UserTokenRequest` because the\n``token_name`` field is optional on modify requests.",
   "type": "object",
   "properties": {
      "token_name": {
         "anyOf": [
            {
               "maxLength": 64,
               "minLength": 1,
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "examples": [
            "laptop token"
         ],
         "title": "User-given name of the token"
      },
      "scopes": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "examples": [
            [
               "read:all"
            ]
         ],
         "title": "Token scopes"
      },
      "expires": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Expiration timestamp of the token in seconds since epoch, or None to never expire.",
         "examples": [
            1625986130
         ],
         "title": "Expiration time"
      }
   }
}

Fields:
field expires: datetime | None = None

Expiration timestamp of the token in seconds since epoch, or None to never expire.

field scopes: list[str] | None = None
field token_name: str | None = None
Constraints:
  • min_length = 1

  • max_length = 64