Enum AuthenticationProvider

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<AuthenticationProvider>

    public enum AuthenticationProvider
    extends java.lang.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 Summary

      Enum Constants 
      Enum ConstantDescription
      Apple
      Apple OAuth ??? TODO ??? authentication provider.
      Facebook
      Facebook OAuth 2.0 authentication provider.
      Google
      Google OAuth 2.0 authentication provider.
      Internal
      The internal login authentication with user ID and password.
      LinkedIn
      LinkedIn OAuth 2.0 authentication provider.
      Microsoft
      Microsoft identity platform OAuth 2.0 authentication provider.
      Twitter
      Twitter OAuth 1.0a authentication provider.
    • Field Summary

      Fields 
      Modifier and TypeFieldDescription
      booleanisExternal
      Flag for external authentication provider.
      java.lang.StringproviderName
      The name of the authentication provider.
      java.lang.StringtextID
      The text ID used for localized strings: "authProvider."+name()".
    • Enum Constant Detail

      • Internal

        public static final AuthenticationProvider Internal
        The internal login authentication with user ID and password.
      • Microsoft

        public static final AuthenticationProvider Microsoft
        Microsoft identity platform OAuth 2.0 authentication provider.
    • Field Detail

      • providerName

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

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

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

      • values

        public static AuthenticationProvider[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (AuthenticationProvider c : AuthenticationProvider.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static AuthenticationProvider valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getLocalizedName

        public java.lang.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 java.lang.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 java.lang.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​(java.lang.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.