UserTokenRequest

pydantic model gafaelfawr.models.token.UserTokenRequest

The parameters of a user token that are under the user’s control.

Parameters:

data (Any)

Show JSON schema
{
   "title": "UserTokenRequest",
   "description": "The parameters of a user token that are under the user's control.",
   "type": "object",
   "properties": {
      "token_name": {
         "examples": [
            "laptop token"
         ],
         "maxLength": 64,
         "minLength": 1,
         "title": "User-given name of the token",
         "type": "string"
      },
      "scopes": {
         "$ref": "#/$defs/Scopes",
         "default": [],
         "examples": [
            [
               "read:all"
            ]
         ],
         "title": "Token scope"
      },
      "expires": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Expiration timestamp of the token in seconds since epoch",
         "examples": [
            1625986130
         ],
         "title": "Expiration time"
      }
   },
   "$defs": {
      "Scopes": {}
   },
   "required": [
      "token_name"
   ]
}

Fields:
field expires: UtcDatetime | None = None

Expiration timestamp of the token in seconds since epoch

field scopes: Scopes = {}
field token_name: str [Required]
Constraints:
  • min_length = 1

  • max_length = 64