This group is used by operations but is not declared in the specification’s tag list, so it has no description of its own.

2 operations
GET /callbacks/patron

Callback endpoint for Patron SSO login and registration.

No authentication CallbackPatron

Callback endpoint for Patron SSO login and registration.

If the authentication is successful, the query parameters 'code' and 'state' are required. Otherwise, the query parameter 'error' is required.

Example request

cURL

curl -X GET "$PLAS_BASE_URL/callbacks/patron?version=0.6.6" \
  -H 'Accept: application/json'

JavaScript

const response = await fetch(`${process.env.PLAS_BASE_URL}/callbacks/patron?version=0.6.6`, {
  method: "GET",
  headers: {
    "Accept": "application/json",
  },
});

Python

import os
import requests

response = requests.get(
    f"{os.environ['PLAS_BASE_URL']}/callbacks/patron",
    params={
        "version": "0.6.6",
    },
    headers={
        "Accept": "application/json",
    },
)
response.raise_for_status()
The host and token are environment variables: PLAS_BASE_URL the provider’s base URL.

Parameters

code
query · string

The code obtained from the SSO patron login.

Example: SplxlOBeZQQYbYS6WxSbIA
state
query · string

The state sent to the SSO patron login.

Example: af0ifjsldkj
app_redirect_url
query · string (uri)

The app redirect url sent to the SSO patron login.

Example: https://app.nordby.bibliotek.example/callback
can_be_registered
query · boolean

Indicates whether the patron can be registered.

Example: true
consent
query · array of string

Each value is formatted as type:version where both type and version are URL Base64 encoded (the colon separator is not encoded). Multiple consent parameters may be present. Only returned when can_be_registered is true.

All consents returned to this SSO callback must be included when registering this patron through the POST /patron/registration/identifier endpoint. If a new patron registration flow is started from this callback, any consent parameters from previous callbacks should be ignored.

Example: bG9hbl9oaXN0b3J5:MjAyNS0wMQ
error
query · string

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 codes:

  • sso_unauthorized_client — The client is not authorized to use the SSO service.
  • sso_invalid_credentials — The credentials provided to the SSO service are invalid.
  • sso_access_denied — The patron's account has been blocked or is not eligible for use with this service (e.g. account locked).
  • sso_request_expired — The SSO authentication flow expired before the patron completed it.
  • sso_login_cancelled — The patron actively cancelled the authentication process.
  • sso_consent_denied — The patron was authenticated but refused to give the required consent.
  • sso_session_expired — The patron's SSO session ended or the patron was logged out during the flow.
  • sso_unknown_error — An unspecified error occurred during the SSO authentication process.
  • provider_patron_not_found — The patron could not be found in the provider's system.
  • provider_service_unavailable — The provider was unable to contact the identity provider (e.g. maintenance or connectivity issues).
  • provider_unknown_error — An unspecified error occurred in the provider's system.

For error codes such as sso_access_denied and sso_consent_denied, the vendor should advise the patron to contact their local library. Other error codes may also warrant this guidance, at the vendor's discretion.

Example: sso_unauthorized_client
error_description
query · string

A human-readable text providing additional details about the error. This is intended for logging and debugging purposes.

Example: The patron cancelled the login.
Shared across operations: version. See the shared contract on the version page.

Responses

302 Redirect to the application that initialized the SSO patron login, with the code and state as query parameters.

No response body.

GET /callbacks/patron/delete

Callback endpoint for Patron SSO delete.

No authentication CallbackPatronDelete

Callback endpoint for Patron SSO delete.

If the authentication is successful, the query parameters 'code' and 'state' are required. Otherwise, the query parameter 'error' is required.

Example request

cURL

curl -X GET "$PLAS_BASE_URL/callbacks/patron/delete?version=0.6.6" \
  -H 'Accept: application/json'

JavaScript

const response = await fetch(`${process.env.PLAS_BASE_URL}/callbacks/patron/delete?version=0.6.6`, {
  method: "GET",
  headers: {
    "Accept": "application/json",
  },
});

Python

import os
import requests

response = requests.get(
    f"{os.environ['PLAS_BASE_URL']}/callbacks/patron/delete",
    params={
        "version": "0.6.6",
    },
    headers={
        "Accept": "application/json",
    },
)
response.raise_for_status()
The host and token are environment variables: PLAS_BASE_URL the provider’s base URL.

Parameters

code
query · string

The code obtained from the SSO patron delete.

Example: SplxlOBeZQQYbYS6WxSbIA
state
query · string

The state sent to the SSO patron delete.

Example: af0ifjsldkj
app_redirect_url
query · string (uri)

The app redirect url sent to the SSO patron delete.

Example: https://app.nordby.bibliotek.example/callback
error
query · string

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 codes:

  • sso_unauthorized_client — The client is not authorized to use the SSO service.
  • sso_invalid_credentials — The credentials provided to the SSO service are invalid.
  • sso_access_denied — The patron's account has been blocked or is not eligible for use with this service (e.g. account locked).
  • sso_request_expired — The SSO authentication flow expired before the patron completed it.
  • sso_login_cancelled — The patron actively cancelled the authentication process.
  • sso_consent_denied — The patron was authenticated but refused to give the required consent.
  • sso_session_expired — The patron's SSO session ended or the patron was logged out during the flow.
  • sso_unknown_error — An unspecified error occurred during the SSO authentication process.
  • provider_patron_not_found — The patron could not be found in the provider's system.
  • provider_service_unavailable — The provider was unable to contact the identity provider (e.g. maintenance or connectivity issues).
  • provider_unknown_error — An unspecified error occurred in the provider's system.

For error codes such as sso_access_denied and sso_consent_denied, the vendor should advise the patron to contact their local library. Other error codes may also warrant this guidance, at the vendor's discretion.

Example: sso_unauthorized_client
error_description
query · string

A human-readable text providing additional details about the error. This is intended for logging and debugging purposes.

Example: The patron cancelled the login.
Shared across operations: version. See the shared contract on the version page.

Responses

302 Redirect to the application that initialized the SSO patron delete, with the code and state as query parameters.

No response body.