Login
Let patrons log in the way their library supports, sign up as new patrons, share a device and get back in when they forget their password.
2.2.1 Log in
SupportedLet the patron identify themselves, so the client can show their loans, reservations and everything else that belongs to them.
What you can build
Login with the methods the library system offers: identifier and password or PIN, identifier alone, or single sign-on through an identity provider. The configuration tells the client which methods and identifier types to offer, so the login screen matches the library.
Typical flow
- With a password or PIN, the client sends the identifier and the credential to
Authenticate.Patron - Without a credential, the client sends the identifier alone to
Authenticate.Patron No Password - With single sign-on, the client fetches the login URL with
Get, and the patron logs in with the identity provider.Patron Authentication Url - The provider returns
codeandstatetoCallback, and the client exchanges the code withPatron Authenticate.Patron By Code And Code Verifier - Every method responds with the patron, including the
patronthe other patron calls use.Id
What the API provides
patron.inlogin Getlists theConfiguration identifier,Types credentialsandidentitythe provider accepts.Providers patron.says whether the patron logs in with alogin. credentials passwordor apin. The field in the request is calledpasswordeither way.Authenticateis only available whenPatron No Password patron.is true. The specification says it should only be used when absolutely necessary.login. allow Without Credential - Single sign-on uses PKCE: the client sends a
code_and achallenge state, and later the matchingcode_.verifier - When the patron does not exist but can be registered, the callback carries
can_, and the client continues with sign-up (2.2.3).be_ registered=true - A failed sign-on returns
erroron the callback, for examplesso_orlogin_ cancelled provider_. Forpatron_ not_ found sso_andaccess_ denied sso_, the patron should be advised to contact their library.consent_ denied
Calls in the API
- Enabled in the configuration
-
GetConfiguration
Choose one path
With a password
Without a password
With single sign-on
- GET
/patron/authentication/identity-providerThis will fetch a SSO URL used for patron login, matching the chosen identity provider. - GET
/callbacks/patronCallback endpoint for Patron SSO login and registration. - POST
/patron/authentication/identity-providerAuthenticate patron by code and code verifier from SSO login.
2.2.3 Sign up
SupportedLet a new patron register with the library from the client.
What you can build
Patrons become borrowers without visiting the library: with an identifier, or through an identity provider. They choose where to pick up reservations and accept the library's consents as part of the sign-up.
Typical flow
- With an identifier, the client checks with
Isthat the patron can be registered.Patron Registration Possible - The patron chooses a pick-up location and accepts the consents. The client creates the patron with
Register.Patron By Identifier - With single sign-on, the patron goes through the identity provider from
Get. The callbackRegister Patron Url CallbackcarriesPatron can_and the consents to accept.be_ registered - When
can_is true, the client collects the pick-up location and consents and creates the patron withbe_ registered Register. Otherwise the provider has already created the patron, and the client logs in (2.2.1).Patron By Code And Code Verifier - The response tells how far the registration has come in
status.
What the API provides
patron.inregistration Getlists the identifier types and identity providers that can be used to register.Configuration statusisdone,in_orprogress contact_. When the status isthe_ library done,patronshould be set; otherwise the patron logs in again.Id pickupis required on both registration calls.Location - The client must make sure the patron has accepted each consent in
consentsbefore the request is sent. - Consents from the callback are formatted as
type:version, URL Base64 encoded, and all of them must be included in the registration.
Calls in the API
- Enabled in the configuration
-
GetConfiguration
Choose one path
With an identifier
With single sign-on
- GET
/patron/registration/identity-providerThis will redirect the user to the chosen identity provider, for signup. - GET
/callbacks/patronCallback endpoint for Patron SSO login and registration. - POST
/patron/registration/identity-providerRegister patron by code and code verifier from SSO registration.
2.2.4 Multiple users
SupportedLet several patrons stay logged in on the same device and switch between them.
What you can build
Useful for a household that shares a device: each patron logs in once, and the client switches between them without logging out and in again.
Typical flow
- Each patron logs in separately (2.2.1).
- The client keeps the
patronof each patron who is logged in on the device.Id - When the patron switches user, the client uses the chosen patron's
patronin the calls that follow.Id
What the API provides
- The specification has no separate operation for several users. Switching user happens in the client.
- Removing a patron from the device happens in the client and does not change the patron's account at the library.
Calls in the API
The API supplies the data — your service performs the action
2.2.5 Reset password
SupportedLet a patron who has forgotten their password or PIN get a link to set a new one.
What you can build
Patrons get back into their account from the login screen, without contacting the library.
Typical flow
- The patron enters their identifier and the email address registered with the library.
- The client calls
Reset.Patron Credential - The provider sends a reset link to that address, and the patron sets a new credential through it.
- The patron logs in with the new credential (2.2.1).
What the API provides
- Only offer the feature when
patron.incredentials. resettable Getlists a credential. WhenConfiguration credentialsis missing, offer neither reset nor change. credentialselectspasswordorpin. When it is missing, the provider decides which one to reset.- The identifier follows
patron..login. identifier Types emailis required and only selects one of the patron's addresses: the link is sent only if that address is attached to the patron and verified. - A well-formed request always gets
202, whether a link is sent or not, so the call never reveals whether a patron exists. - The link is the provider's. Its token must be single use and expire after a short period, and the request carries no URL.
Calls in the API
- Enabled in the configuration
-
GetConfiguration