# Patron Authentication

Provider API v0.6.5 · 4 operations
Source: https://plas.redia.dk/en/provider/v0.6.5/patron-authentication/

No description in the specification.

## Authenticate patron

`POST` `/patron/authentication` · `AuthenticatePatron`

Authenticate patron by credentials.

### Parameters

Shared across operations: `version`. [See the shared contract on the version page.](https://plas.redia.dk/en/provider/v0.6.5/)

### Request body

`application/json` · required

Authentication Patron

[`PatronAuthenticationRequestBody`](https://plas.redia.dk/en/provider/v0.6.5/schemas/#PatronAuthenticationRequestBody)

### Responses

- `200` [`PatronAuthenticationResponseBody`](https://plas.redia.dk/en/provider/v0.6.5/schemas/#PatronAuthenticationResponseBody) — Success

Error responses: 400 · 401 — [See the shared contract on the version page.](https://plas.redia.dk/en/provider/v0.6.5/)

## Authenticate patron by code and code verifier from SSO login.

`POST` `/patron/authentication/authenticate-token` · `AuthenticatePatronByCodeAndCodeVerifier`

### Parameters

Shared across operations: `version`. [See the shared contract on the version page.](https://plas.redia.dk/en/provider/v0.6.5/)

### Request body

`application/x-www-form-urlencoded` · required

- `code` (`string`, required) — The code obtained from a SSO patron authentication.
- `code_verifier` (`string`, required) — The code verifier use to create the code challenge use to obtained the code.
- `identity_provider` ([`ConfigurationPatronIdentityProviderType`](https://plas.redia.dk/en/provider/v0.6.5/schemas/#ConfigurationPatronIdentityProviderType), required)

### Responses

- `200` [`PatronAuthenticationByCodeAndCodeVerifierResponseBody`](https://plas.redia.dk/en/provider/v0.6.5/schemas/#PatronAuthenticationByCodeAndCodeVerifierResponseBody) — Success

Error responses: 400 · 401 — [See the shared contract on the version page.](https://plas.redia.dk/en/provider/v0.6.5/)

## This will fetch a SSO URL used for patron login, matching the chosen identity provider.

`POST` `/patron/authentication/identity-provider` · `GetPatronAuthenticationUrlByIdentityProvider`

### Parameters

- `identity_provider` (In `query`, [`ConfigurationPatronIdentityProviderType`](https://plas.redia.dk/en/provider/v0.6.5/schemas/#ConfigurationPatronIdentityProviderType), required) — The identity provider type, found in GET /configuration.
- `code_challenge` (In `query`, `string`, required) — A hashed value (of the code_verifier from a PKCE flow) used to secure the authorization code exchange.
- `state` (In `query`, `string`, required) — A random string to protect against CSRF and track the request state. The value should be returned to the Vendor on the callback url after login.
- `prompt` (In `query`, `string enum`, optional) — If prompt is set to login, the returned url should force a new login, even if the user is already logged in.
- `app_redirect_url` (In `query`, `string (uri)`, optional) — This value should be returned to the Vendor on the callback url after login.

Shared across operations: `version`. [See the shared contract on the version page.](https://plas.redia.dk/en/provider/v0.6.5/)

### Responses

- `200` [`PatronAuthenticationIdentityProviderResponseBody`](https://plas.redia.dk/en/provider/v0.6.5/schemas/#PatronAuthenticationIdentityProviderResponseBody) — Success

Error responses: 400 · 401 — [See the shared contract on the version page.](https://plas.redia.dk/en/provider/v0.6.5/)

## Authenticate patron without use of a password

`POST` `/patron/authentication/no-password` · `AuthenticatePatronNoPassword`

Authenticate patron without use of a password. This should only be used when absolutely necessary.

### Parameters

Shared across operations: `version`. [See the shared contract on the version page.](https://plas.redia.dk/en/provider/v0.6.5/)

### Request body

`application/json` · required

Authentication Patron without using password

[`PatronAuthenticationNoPasswordRequestBody`](https://plas.redia.dk/en/provider/v0.6.5/schemas/#PatronAuthenticationNoPasswordRequestBody)

### Responses

- `200` [`PatronAuthenticationNoPasswordResponseBody`](https://plas.redia.dk/en/provider/v0.6.5/schemas/#PatronAuthenticationNoPasswordResponseBody) — Success

Error responses: 400 · 401 — [See the shared contract on the version page.](https://plas.redia.dk/en/provider/v0.6.5/)
