Skip to content

Commit 3558606

Browse files
committed
feat: add auth0 token endpoint
1 parent 9930ccc commit 3558606

File tree

3 files changed

+452
-205
lines changed

3 files changed

+452
-205
lines changed

client/public/openapi.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,6 +1586,73 @@
15861586
}
15871587
}
15881588
},
1589+
"/api/__auth0/token": {
1590+
"post": {
1591+
"summary": "Get Auth0 Management API token",
1592+
"description": "Request an Auth0 Management API JWT token using the Client Credentials grant.\nThis endpoint requires `ADMIN_AUTH0_PERMISSION` and uses the following\nenvironment variables: `AUTH0_CLIENT_ID`, `AUTH0_CLIENT_SECRET`, and `AUTH0_DOMAIN`.\nReturns a JSON response containing access_token, token_type, and expires_in when successful.\n",
1593+
"tags": [
1594+
"System",
1595+
"Auth0"
1596+
],
1597+
"responses": {
1598+
"200": {
1599+
"description": "Successfully obtained Auth0 management API token",
1600+
"content": {
1601+
"application/json": {
1602+
"schema": {
1603+
"type": "object",
1604+
"properties": {
1605+
"access_token": {
1606+
"type": "string"
1607+
},
1608+
"token_type": {
1609+
"type": "string"
1610+
},
1611+
"expires_in": {
1612+
"type": "integer"
1613+
}
1614+
}
1615+
}
1616+
}
1617+
}
1618+
},
1619+
"403": {
1620+
"description": "Unauthorized - `ADMIN_AUTH0_PERMISSION` required",
1621+
"content": {
1622+
"application/json": {
1623+
"schema": {
1624+
"type": "object",
1625+
"properties": {
1626+
"success": {
1627+
"type": "boolean",
1628+
"example": false
1629+
},
1630+
"error": {
1631+
"type": "string"
1632+
}
1633+
}
1634+
}
1635+
}
1636+
}
1637+
},
1638+
"500": {
1639+
"description": "Server error while requesting Auth0 token",
1640+
"content": {
1641+
"application/json": {
1642+
"schema": {
1643+
"type": "object",
1644+
"properties": {
1645+
"error": {
1646+
"type": "string"
1647+
}
1648+
}
1649+
}
1650+
}
1651+
}
1652+
}
1653+
}
1654+
}
1655+
},
15891656
"/api/__d1/schema": {
15901657
"get": {
15911658
"summary": "Get database table names (available only for D1)",

0 commit comments

Comments
 (0)