Class SignInRegistrations
java.lang.Object
org.jwcarman.who.oidc.SignInRegistrations
The client registrations who signs people in with, each with the issuer its credentials are
stored under. Only
authorization_code registrations take part; one that cannot be signed
in with safely fails with InvalidRegistrationException.-
Method Summary
Modifier and TypeMethodDescriptionall()Every registration, in the order the application declared them.Finds a registration by id.booleanisEmpty()Whether there are no registrations to sign in with.The name a person knows a registration by, its client name, such asGitHub.static SignInRegistrationsof(Iterable<org.springframework.security.oauth2.client.registration.ClientRegistration> clientRegistrations, Map<String, ProviderSettings> settings) Reads the sign-in registrations.
-
Method Details
-
of
public static SignInRegistrations of(Iterable<org.springframework.security.oauth2.client.registration.ClientRegistration> clientRegistrations, Map<String, ProviderSettings> settings) Reads the sign-in registrations.- Parameters:
clientRegistrations- the application's client registrationssettings-who.oidc.providers, by registration id- Returns:
- the registrations who signs in with
- Throws:
InvalidRegistrationException- when one cannot be signed in with safely
-
find
Finds a registration by id.- Parameters:
registrationId- the client registration id- Returns:
- the registration, or empty when who does not sign in with it
-
name
The name a person knows a registration by, its client name, such asGitHub. Spring Security makes it the registration id when the application sets none.- Parameters:
registrationId- the client registration id- Returns:
- the client name, or the id when who does not sign in with the registration
-
isEmpty
public boolean isEmpty()Whether there are no registrations to sign in with.- Returns:
truewhen there are none
-
all
Every registration, in the order the application declared them.- Returns:
- the registrations
-