[auth.ticket.create]
auth.ticket.create is a slot in the auth namespace, in Hyperlambda, the language of Magic Cloud. Issues a signed JWT carrying the supplied username, roles, and claims; typically returned after a successful login.
- Returns: Resolves to the created JWT ticket string
Arguments
Required arguments come first, then the optional ones in the order they are declared.
| Argument | Type | Required | Description |
|---|---|---|---|
[username] |
string | yes | Username to put in the ticket. |
[roles] |
lambda | no | Roles to put in the ticket. |
[roles] / any node name |
string | no | List item. Can be repeated. |
[claims] |
lambda | no | Claims to put in the ticket. |
[claims] / any node name |
string | no | Named map entry. Can be repeated. |
[expires] |
DateTime | no | Absolute UTC expiration time. |
[duration] |
long | no | Relative expiration duration in minutes. |
[private-key] |
string | no | RSA private key as PEM, or DER as base64 or byte[], signing the ticket with RS256 instead of HS256 using the auth secret. |
Constraints
- AtMostOneOf: Use either absolute [expires] or relative [duration] (
[expires],[duration])
Guide
JSON declaration
This is the complete declaration of auth.ticket.create, as the running system describes it. It is also published as slot.json.
JSON declaration (loads when opened)
← auth.jwks |
all auth.* slots |
auth.ticket.get → |