Skip to content

Commit 55696f6

Browse files
nkottarymortenpi
andauthored
Update docs/auth-flows.md
Co-authored-by: Morten Piibeleht <[email protected]>
1 parent 3e2aa5d commit 55696f6

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

docs/auth-flows.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,20 @@ PkgAuthentication supports two different authentication mechanisms:
8383
1. Classic Authentication Flow
8484
2. Device Authentication Flow
8585

86-
When initiating a fresh authentication, PkgAuthentication.jl calls `/auth/configuration` endpoint to determine whether the Pkg server supports device authentication. This endpoint MUST return a 200 response. When device authentication is not supported by the server the response body MUST contain the following JSON data :
86+
When initiating the authentication flow for a brand new token, PkgAuthentication calls the package server authentication configuration endpoint at
87+
88+
```
89+
$(pkg_server)/$(auth_suffix)/configuration
90+
```
91+
92+
which can be used to advertise what authentication flows the server supports.
93+
94+
For a valid implementation of the configuration endpoint, the package server:
95+
96+
1. MUST always return a `200` HTTP status code.
97+
2. The response body MUST be a valid JSON object (i.e. `{...}`)
98+
99+
If the response is invalid (non-`200` code or an invalid JSON object), PkgAuthentication will assume that the server only supports the _Classic Authentication Flow, and proceed accordingly.
87100

88101
```json
89102
{

0 commit comments

Comments
 (0)