# Patron Authentication

Provider API v0.6.5 · 4 operasjoner
Kilde: https://plas.redia.dk/no/provider/v0.6.5/patron-authentication/

Ingen beskrivelse i spesifikasjonen.

## Authenticate patron

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

Authenticate patron by credentials.

### Parametere

Felles for operasjonene: `version`. [Se den felles kontrakten på versjonssiden.](https://plas.redia.dk/no/provider/v0.6.5/)

### Request body

`application/json` · påkrevd

Authentication Patron

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

### Svar

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

Feilsvar: 400 · 401 — [Se den felles kontrakten på versjonssiden.](https://plas.redia.dk/no/provider/v0.6.5/)

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

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

### Parametere

Felles for operasjonene: `version`. [Se den felles kontrakten på versjonssiden.](https://plas.redia.dk/no/provider/v0.6.5/)

### Request body

`application/x-www-form-urlencoded` · påkrevd

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

### Svar

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

Feilsvar: 400 · 401 — [Se den felles kontrakten på versjonssiden.](https://plas.redia.dk/no/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`

### Parametere

- `identity_provider` (i `query`, [`ConfigurationPatronIdentityProviderType`](https://plas.redia.dk/no/provider/v0.6.5/schemas/#ConfigurationPatronIdentityProviderType), påkrevd) — The identity provider type, found in GET /configuration.
- `code_challenge` (i `query`, `string`, påkrevd) — A hashed value (of the code_verifier from a PKCE flow) used to secure the authorization code exchange.
- `state` (i `query`, `string`, påkrevd) — 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` (i `query`, `string enum`, valgfri) — 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` (i `query`, `string (uri)`, valgfri) — This value should be returned to the Vendor on the callback url after login.

Felles for operasjonene: `version`. [Se den felles kontrakten på versjonssiden.](https://plas.redia.dk/no/provider/v0.6.5/)

### Svar

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

Feilsvar: 400 · 401 — [Se den felles kontrakten på versjonssiden.](https://plas.redia.dk/no/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.

### Parametere

Felles for operasjonene: `version`. [Se den felles kontrakten på versjonssiden.](https://plas.redia.dk/no/provider/v0.6.5/)

### Request body

`application/json` · påkrevd

Authentication Patron without using password

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

### Svar

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

Feilsvar: 400 · 401 — [Se den felles kontrakten på versjonssiden.](https://plas.redia.dk/no/provider/v0.6.5/)
