/callbacks/patron/auth Callback endpoint for Patron SSO authentication.
Callback endpoint for Patron SSO authentication.
If the login is successful, the query parameters 'code' and 'state' are required. Otherwise, the query parameter 'error' is required.
Eksempel på kall
cURL
curl -X GET "$PLAS_BASE_URL/callbacks/patron/auth?version=0.6.5" \
-H 'Accept: application/json' JavaScript
const response = await fetch(`${process.env.PLAS_BASE_URL}/callbacks/patron/auth?version=0.6.5`, {
method: "GET",
headers: {
"Accept": "application/json",
},
}); Python
import os
import requests
response = requests.get(
f"{os.environ['PLAS_BASE_URL']}/callbacks/patron/auth",
params={
"version": "0.6.5",
},
headers={
"Accept": "application/json",
},
)
response.raise_for_status() PLAS_BASE_URL providerens adresse.
Parametere
- code
- query · stringEksempel: SplxlOBeZQQYbYS6WxSbIA
The code obtained from the SSO patron login.
- state
- query · stringEksempel: af0ifjsldkj
The state send to the SSO patron login.
- app_redirect_url
- query · string (uri)Eksempel: https://app.nordby.bibliotek.example/callback
The app redirect url send to the SSO patron login.
- error
- query · stringEksempel: sso_unauthorized_client
A machine-readable error code indicating why the operation failed. Its presence signifies a failure and should be handled accordingly by the Vendor Backend.
- error_description
- query · stringEksempel: The patron cancelled the login.
A human-readable text providing additional details about the error. This is intended for logging and debugging purposes.
Svar
302 Redirect to the application that initialized the SSO patron login, with the code and state as query parameters.
Ikke noe innhold i svaret.