OAuth2 authorization server metadata.
GET
OK
application/json- response
authorization_endpoint?stringcode_challenge_methods_supported?array<>grant_types_supported?array<>issuer?stringregistration_endpoint?stringresponse_types_supported?array<>revocation_endpoint?stringscopes_supported?array<string>token_endpoint?stringtoken_endpoint_auth_methods_supported?array<>The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.
curl -X GET \ "$CODER_URL/.well-known/oauth-authorization-server"const { CODER_URL } = process.env;const url = `${CODER_URL}/.well-known/oauth-authorization-server`;const response = await fetch(url, { method: "GET",});console.log(response.status, await response.text());import osimport requestsurl = os.environ["CODER_URL"] + "/.well-known/oauth-authorization-server"response = requests.get( url,)print(response.status_code, response.text)package mainimport ( "fmt" "io" "net/http" "os")func main() { url := os.Getenv("CODER_URL") + "/.well-known/oauth-authorization-server" req, err := http.NewRequest(http.MethodGet, url, nil) if err != nil { panic(err) } resp, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer resp.Body.Close() out, err := io.ReadAll(resp.Body) if err != nil { panic(err) } fmt.Println(resp.Status, string(out))}Example Response200
{ "authorization_endpoint": "string", "code_challenge_methods_supported": [ "S256" ], "grant_types_supported": [ "authorization_code" ], "issuer": "string", "registration_endpoint": "string", "response_types_supported": [ "code" ], "revocation_endpoint": "string", "scopes_supported": [ "string" ], "token_endpoint": "string", "token_endpoint_auth_methods_supported": [ "client_secret_basic" ]}