gluecron_rotate_token
Rotate one of your tokens: mint a new secret with the same name, scopes / permissions, repository and expiry, returned ONCE as token. grace_seconds (default 0, max 604800 = 7 days) keeps the old secret working that long; 0 kills it now. Rotating again ends an earlier grace period. expected_rotation_count (from gluecron_get_token's rotationCount) makes it compare-and-swap; two concurrent rotations never both win. type is pat (personal access token, glc_), repo (repository token, gcft_) or deploy (deploy token, gcdt_). PATs need 'admin' scope; repository and deploy tokens need 'repo'. Audit-logged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Token id | |
| type | Yes | Token type: pat (personal access token, glc_), repo (repository token, gcft_) or deploy (deploy token, gcdt_) | |
| grace_seconds | No | Seconds the old secret keeps working (0 to 604800). Default 0. | |
| expected_rotation_count | No | Optional compare-and-swap guard: the rotationCount you last saw. |