Skip to content

Commit 7b201a5

Browse files
author
hakan458
committed
feat: DIA-2201: Add endpoint to rotate personal access token
1 parent 8298e89 commit 7b201a5

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

fern/openapi/overrides.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2451,6 +2451,13 @@ paths:
24512451
x-fern-sdk-method-name: refresh
24522452
x-fern-audiences:
24532453
- public
2454+
/api/token/rotate:
2455+
post:
2456+
$ref: ./resources/tokens.yaml#/paths/~1api~1token~1rotate/post
2457+
x-fern-sdk-group-name: tokens
2458+
x-fern-sdk-method-name: rotate
2459+
x-fern-audiences:
2460+
- public
24542461
components:
24552462
securitySchemes:
24562463
Token:

fern/openapi/resources/tokens.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,33 @@ paths:
5151
"401":
5252
description: "Invalid refresh token"
5353

54+
/api/token/rotate:
55+
post:
56+
summary: Rotate token
57+
description: >
58+
Blacklist existing refresh token, and get a new refresh token.
59+
requestBody:
60+
content:
61+
application/json:
62+
schema:
63+
type: object
64+
required:
65+
- refresh
66+
properties:
67+
refresh:
68+
type: string
69+
description: JWT refresh token
70+
responses:
71+
"200":
72+
description: "Refresh token successfully rotated"
73+
content:
74+
application/json:
75+
schema:
76+
$ref: "#/components/schemas/RotateTokenResponse"
77+
"400":
78+
description: "Invalid refresh token"
79+
80+
5481
/api/token/blacklist:
5582
post:
5683
summary: Blacklist token
@@ -130,6 +157,15 @@ components:
130157
type: string
131158
description: New JWT access token
132159

160+
RotateTokenResponse:
161+
type: object
162+
required:
163+
- refresh
164+
properties:
165+
refresh:
166+
type: string
167+
description: New JWT refresh token
168+
133169
JWTSettingsResponse:
134170
type: object
135171
required:

0 commit comments

Comments
 (0)