# auth.generate_token

Generate a token to be used for authentication.

Note

This method is not supported when server security requires replay-resistant authentication as part of GPOS STIG requirements.

Type: object

##

Type: array
No Additional Items

#### Tuple Validation

##### Parameter 1: ttl

#### ttl

Default: 600

Time-to-live for the token in seconds or `null` for no expiration (default 600).

## Any of

Type: integer
Type: null

##### Parameter 2: attrs

#### attrs

Type: object Default: {}

Additional attributes to embed in the token.

##### Parameter 3: match_origin

#### match_origin

Type: boolean Default: true

Whether the token must be used from the same origin that created it.

##### Parameter 4: single_use

#### single_use

Type: boolean Default: false

Whether the token can only be used once.

##

#### Result

Type: string

Generated authentication token.

Required roles: