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

1 operation
GET /callbacks/patron/auth

Callback endpoint for Patron SSO authentication.

No authentication CallbackPatronAuthentication

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.

Example request

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()
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 send to the SSO patron login.

Example: af0ifjsldkj
app_redirect_url
query · string (uri)

The app redirect url send to the SSO patron login.

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.

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.