This example shows how to call some methods on the Auth.AuthConfiguration class. Before you can run this sample, you need to provide valid values for the URLs and developer name.
String communityUrl = '<Add URL>'; String startUrl = '<Add URL>'; Auth.AuthConfiguration authConfig = new Auth.AuthConfiguration(communityUrl,startUrl); List<AuthProvider> authPrvs = authConfig.getAuthProviders(); String bColor = authConfig.getBackgroundColor(); String fText = authConfig.getFooterText(); String sso = Auth.AuthConfiguration.getAuthProviderSsoUrl(communityUrl, startUrl, 'developerName');
The following are constructors for AuthConfiguration.
public List<AuthConfigProviders> getAuthConfigProviders()
Type: List<AuthConfigProviders>
A list of authentication providers (AuthConfigProviders sObjects, which are children of the AuthProvider sObject).
public List<AuthProvider> getAuthProviders()
Type: List<AuthProvider>
A list of authentication providers (AuthProvider sObjects) for the community or custom domain.
public static String getAuthProviderSsoUrl(String communityOrCustomUrl, String startUrl, String developerName)
public List<SamlSsoConfig> getSamlProviders()
Type: List<SamlSsoConfig>
A list of SAML-based authentication providers (SamlSsoConfig sObjects).
public static String getSamlSsoUrl(String communityOrCustomUrl, String startURL, String samlId)
public Boolean getSelfRegistrationEnabled()
Type: Boolean
public Boolean getUsernamePasswordEnabled()
Type: Boolean