Package com.iizix.comm.oauth
Enum Class AuthenticationProvider
- All Implemented Interfaces:
Serializable
,Comparable<AuthenticationProvider>
,Constable
Authentication provider for sign in.
Localized texts for the providerName
is possible with text IDs starting with "authProvider."+<i>providerName</i>
. Currently, only English names are provided. This can be overridden by the System App or localized in the app's text tables.
Localized text IDs
authProvider.Internal = Internal authProvider.Apple = Apple authProvider.Facebook = Facebook authProvider.Google = Google authProvider.LinkedIn = LinkedIn authProvider.Microsoft = Microsoft authProvider.Twitter = Twitter
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Enum Constant Summary
Enum ConstantDescriptionApple OAuth ??? TODO ??? authentication provider.Facebook OAuth 2.0 authentication provider.Google OAuth 2.0 authentication provider.The internal login authentication with user ID and password.LinkedIn OAuth 2.0 authentication provider.Microsoft identity platform OAuth 2.0 authentication provider.Twitter OAuth 1.0a authentication provider.Field Summary
Method Summary
Modifier and TypeMethodDescriptionstatic AuthenticationProvider
fromProviderName
(String providerName) Gets the authentication provider from a String that must match the authentication provider name.Gets the localized name of the provider.getLocalizedName
(SessionInfo sessionInfo) Gets the localized name of the provider.getLocalizedName
(ILocaleString localeString) Gets the localized name of the provider.static AuthenticationProvider
Returns the enum constant of this class with the specified name.static AuthenticationProvider[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
Enum Constant Details
Internal
The internal login authentication with user ID and password.Apple
Apple OAuth ??? TODO ??? authentication provider.Facebook
Facebook OAuth 2.0 authentication provider.Google
Google OAuth 2.0 authentication provider.LinkedIn
LinkedIn OAuth 2.0 authentication provider.Microsoft
Microsoft identity platform OAuth 2.0 authentication provider.Twitter
Twitter OAuth 1.0a authentication provider.
Field Details
providerName
The name of the authentication provider.isExternal
public final boolean isExternalFlag for external authentication provider.textID
The text ID used for localized strings:"authProvider."+name()"
.
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
getLocalizedName
Gets the localized name of the provider.- Returns:
- The localized name of the provider with a fallback to the English name.
getLocalizedName
Gets the localized name of the provider.- Parameters:
sessionInfo
- The session information,null
to look it up from the current thread.- Returns:
- The localized name of the provider with a fallback to the English name.
getLocalizedName
Gets the localized name of the provider.- Parameters:
localeString
- ThelocaleString
instance to used for localization, ornull
forfallback
return value if text ID is not found.- Returns:
- The localized name of the provider with a fallback to the English name.
fromProviderName
Gets the authentication provider from a String that must match the authentication provider name.- Parameters:
providerName
- The authentication provider name (case insensitive).- Returns:
- The
AuthenticationProvider
that matches the name, ornull
if none was found.