AuthProviderPlugin Interface

This interface is deprecated. For new development, use the abstract class Auth.AuthProviderPluginClass to create a custom OAuth-based authentication provider plug-in for single sign-on in to Salesforce.

Auth

Deprecated. Existing implementations that use Auth.AuthProviderPlugin still work. For new development, use Auth.AuthProviderPluginClass.

The following methods are for AuthProviderPlugin, which, as of API version 39.0, is deprecated. Use themethods in AuthProviderPluginClass instead.

See Also

Deprecated as of API version 39.0. Use the corresponding method in Auth.AuthProviderPluginClass.

public String getCustomMetadataType()

Type: String

The custom metadata type API name for the authentication provider.

Returns the custom metadata type API name for a custom OAuth-based authentication provider for single sign-on to Salesforce. The getCustomMetatadaType() method returns only custom metadata type names. It does not return custom metadata record names.

Deprecated as of API version 39.0. Use the corresponding method in Auth.AuthProviderPluginClass.

public Auth.UserData getUserInfo(Map<String,String> authProviderConfiguration, Auth.AuthProviderTokenResponse response)

  • authProviderConfiguration:

    Type: Map<String,String>

    The configuration for the custom authentication provider. When you create a custom metadata type in Salesforce, the configuration populates with the custom metadata type default values. Or you can set the configuration with values you enter when you create the custom provider in Auth. Providers in Setup.

  • response:

    Type: Auth.AuthProviderTokenResponse

    The OAuth access token, OAuth secret or refresh token, and state provided by the authentication provider to authenticate the current user.

Type: Auth.UserData

Creates a new instance of the Auth.UserData class.

Returns information from the custom authentication provider about the current user. The registration handler and other authentication provider flows use this information.

Deprecated as of API version 39.0. Use the corresponding method in Auth.AuthProviderPluginClass.

public Auth.AuthProviderTokenResponse handleCallback(Map<String,String> authProviderConfiguration, Auth.AuthProviderCallbackState callbackState)

  • authProviderConfiguration:

    Type: Map<StringString>

    The configuration for the custom authentication provider. When you create a custom metadata type in Salesforce, the configuration populates with the custom metadata type default values. Or you can set the configuration with values you enter when you create the custom provider in Auth. Providers in Setup.

  • callbackState:

    Type: Auth.AuthProviderCallbackState

    The class that contains the HTTP headers, body, and queryParams of the authentication request.

Type: Auth.AuthProviderTokenResponse

Creates an instance of the AuthProviderTokenResponse class.

Uses the authentication provider’s supported authentication protocol to return an OAuth access token, OAuth secret or refresh token, and the state passed in when the request for the current user was initiated.

Deprecated as of API version 39.0. Use the corresponding method in Auth.AuthProviderPluginClass.

public System.PageReference initiate(Map<String,String> authProviderConfiguration, String stateToPropagate)

  • authProviderConfiguration:

    Type: Map<StringString>

    The configuration for the custom authentication provider. When you create a custom metadata type in Salesforce, the configuration populates with the custom metadata type default values. Or you can set the configuration with values you enter when you create the custom provider in Auth. Providers in Setup.

  • stateToPropagate:

    Type: String

    The state passed in to initiate the authentication request for the user.

Type: System.PageReference

The URL of the page where the user is redirected for authentication.

Returns the URL where the user is redirected for authentication.

We’ve removed the example implementation for the Auth.AuthProviderPlugin interface because we’ve deprecated the interface and replaced it with an abstract class. See AuthProviderPluginClass Class.