Class SocialLoginMethodFragment

java.lang.Object
com.irurueta.authserver.authorization.api.web.social.SocialLoginMethodFragment
All Implemented Interfaces:
LoginMethodFragment

public class SocialLoginMethodFragment extends Object implements LoginMethodFragment
Contributes the sign-in with the configured external providers to the login page: one link per enabled provider, below the password form and the passkeys. The template reads providers() through this bean, so the page lists exactly the providers that are configured. The bean only exists while at least one is.
  • Field Details

    • ORDER

      public static final int ORDER
      Position of the social sign-in in the login page: after the passkeys, before the one-time tokens.
      See Also:
    • providers

      private final List<String> providers
      The enabled providers, by registration id, in the order they are offered.
  • Constructor Details

    • SocialLoginMethodFragment

      public SocialLoginMethodFragment(List<String> providers)
      Creates the fragment.
      Parameters:
      providers - registration ids of the enabled providers, in the order they are offered.
  • Method Details

    • templateName

      public String templateName()
      Gets the template that holds the fragment.
      Specified by:
      templateName in interface LoginMethodFragment
      Returns:
      login-social.
    • fragmentName

      public String fragmentName()
      Gets the fragment of the template.
      Specified by:
      fragmentName in interface LoginMethodFragment
      Returns:
      login.
    • order

      public int order()
      Gets the position of the fragment.
      Specified by:
      order in interface LoginMethodFragment
      Returns:
      ORDER.
    • providers

      public List<String> providers()
      Lists the enabled providers.
      Returns:
      their registration ids, which also name the message of each link.