Enum Class AuthenticationProvider

java.lang.Object
java.lang.Enum<AuthenticationProvider>
com.iizix.comm.oauth.AuthenticationProvider
All Implemented Interfaces:
Serializable, Comparable<AuthenticationProvider>, Constable

public enum AuthenticationProvider extends Enum<AuthenticationProvider>
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
  • Enum Constant Details

  • Field Details

    • providerName

      public final String providerName
      The name of the authentication provider.
    • isExternal

      public final boolean isExternal
      Flag for external authentication provider.
    • textID

      public final String textID
      The text ID used for localized strings: "authProvider."+name()".
  • Method Details

    • values

      public static AuthenticationProvider[] 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

      public static AuthenticationProvider valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getLocalizedName

      public String getLocalizedName()
      Gets the localized name of the provider.
      Returns:
      The localized name of the provider with a fallback to the English name.
    • getLocalizedName

      public String getLocalizedName(SessionInfo sessionInfo)
      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

      public String getLocalizedName(ILocaleString localeString)
      Gets the localized name of the provider.
      Parameters:
      localeString - The localeString instance to used for localization, or null for fallback return value if text ID is not found.
      Returns:
      The localized name of the provider with a fallback to the English name.
    • fromProviderName

      public static AuthenticationProvider fromProviderName(String providerName)
      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, or null if none was found.