Read the signed-in member's claims
GET
/api/v1/oidc/userinfo
const url = 'https://gpu-kitchen.example.lan/api/v1/oidc/userinfo';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://gpu-kitchen.example.lan/api/v1/oidc/userinfoThe OpenID Connect userinfo endpoint, with the access token. A refusal answers the OAuth 2.0 error object { error, error_description }.
Responses
Section titled “Responses”Success.
Media typeapplication/json
object
sub
required
string
email
string
email_verified
boolean
name
string
preferred_username
string
roles
Array<string>
Example
{ "roles": [ "admin" ]}Error codes: oidc_provider_unavailable.
Media typeapplication/json
object
error
required
object
code
required
Stable snake_case code to branch on.
string
message
required
A sentence to show a person.
string
details
Optional structured context.
fix
Optional place where the problem is fixed.
string
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}