Enum Class IdentityProvider
java.lang.Object
java.lang.Enum<IdentityProvider>
com.irurueta.authserver.authorization.domain.social.IdentityProvider
- All Implemented Interfaces:
Serializable,Comparable<IdentityProvider>,Constable
External identity providers an account can be linked to. The identifier is the registration id of the provider in
the configuration (
authserver.social.providers.<id>) and the value stored with every link.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<IdentityProvider> Finds a provider by its registration id.id()Returns the registration id of the provider.static IdentityProviderReturns the enum constant of this class with the specified name.static IdentityProvider[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GOOGLE
Google, an OpenID Connect provider. -
MICROSOFT
Microsoft Entra ID, an OpenID Connect provider with a multi-tenant issuer. -
APPLE
Sign in with Apple, an OpenID Connect provider whose client secret is a signed JWT. -
GITHUB
GitHub, a plain OAuth 2.0 provider.
-
-
Field Details
-
id
Registration id of the provider, in lower case.
-
-
Constructor Details
-
IdentityProvider
Creates a provider.- Parameters:
id- registration id of the provider.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
id
Returns the registration id of the provider.- Returns:
- the lower case registration id.
-
fromId
Finds a provider by its registration id.- Parameters:
id- registration id, compared exactly.- Returns:
- the provider, or an empty optional when the id is
nullor unknown.
-