- 1 Minute to read
- Print
- DarkLight
start the process of obtaining a JWT
- 1 Minute to read
- Print
- DarkLight
This is an oauth2 compliant authorize endpoint (see https://tools.ietf.org/html/rfc6749) with the following limitations:
- Only grant code flow is allowed
- PKCE is mandatory i.e. you must generate a code_verifier (a randomly generated secret) and include its url safe base64 encoded SHA256 hash as the code_challenge parameter
- Only the S256 code challenge method is supported
- The redirect URI must be set to urn:ietf:wg:oauth:2.0:oob:auto
This api returns a grant code that can then be exchanged for a JWT
This will create a new profile in the dressipi database and should therefore only be used if no refresh token is available.
code_challenge is constructed in the following manner:
- Pick a random code_verifier value, for example 1tBnEmtSImyCykPHxHYBdzpSFhKEj0Q1LuiHd4fdDlY
- code challenge = Base64-url-encode(SHA256(code_verifier)): p7CN1Zi4o5ARn1mYNvNFvj2r5cKkr2k6y7a573eHJXQ in the example above
For more details on PKCE see https://tools.ietf.org/html/rfc7636, appendix A has the definition of base64-url-encode
The JWT for the user
the api client id supplied by dressipi
a randomly generated state value
a urlsafe base64 encoded, SHA256 hash of the code verifier (a cryptographically secure randomly generated string).
Information about the authorization
This is an oauth2 compliant authorize endpoint (see https://tools.ietf.org/html/rfc6749) with the following limitations:
- Only grant code flow is allowed
- PKCE is mandatory i.e. you must generate a code_verifier (a randomly generated secret) and include its URL safe base64 encoded SHA256 hash as the code_challenge parameter
- Only the S256 code challenge method is supported
- The redirect URI must be set to urn:ietf:wg:oauth:2.0:oob:auto
This api returns a grant code that can then be exchanged for a JWT
This will create a new profile in the dressipi database and should therefore only be used if no refresh token is available.
code_challenge is constructed in the following manner:
- Pick a random code_verifier value, for example 1tBnEmtSImyCykPHxHYBdzpSFhKEj0Q1LuiHd4fdDlY
- code challenge = Base64-url-encode(SHA256(code_verifier)): p7CN1Zi4o5ARn1mYNvNFvj2r5cKkr2k6y7a573eHJXQ in the example above
For more details on PKCE see https://tools.ietf.org/html/rfc7636, appendix A has the definition of base64-url-encode
The authorization code generated
The state parameter initially provided. You must verify the matches the initially supplied value.
oauth2 error
Generic oauth error object
The error code (one of the error codes defined by https://tools.ietf.org/html/rfc6749#section-4.1
A human readable description of the error