Posts

Showing posts from February, 2022

Auth.AuthProviderPluginClass to configure an external Salesforce authentication provider

global class B2BTIDAuthPlugin extends Auth .AuthProviderPluginClass { private String customMetadataTypeApiName; private String redirectUrl; private String consumerKey; private String consumerSecret; private String authorizationUrl; private String accessTokenUrl; private String userInfoUrl; private String scope; /** * @description This method is responsible for returning the custom metadata that           stores the api credentials and other details * @author Raja Patnaik | 01-24-2022 * @return String Returns the custom metadata type API name for a custom           OAuth-based authentication provider for single sign-on to Salesforce **/ global String getCustomMetadataType () { String methodName = 'getCustomMetadataType' ; System . debug ( 'Entered Method: ' + methodName ); customMetadataTypeApiName = ...

Custom Authentication Provider Plug-in for SSO

Image
Custom Authentication Provider Plug-in for Single Sign On (SSO)   Create a Custom Authentication Provider Plug-in Authentication Providers You can use third-party authentication providers to configure single sign-on (SSO) and access protected third-party data in Salesforce. This SSO solution, known as social sign-on, includes predefined authentication providers for Facebook and Google. Additionally, you can set up an authentication provider for a third party using OpenID Connect or create a custom provider with OAuth 2.0 support. Customize your authentication provider with request parameters after setting it up. Before you create your Apex class, you create a custom metadata type record for your authentication provider. For details, see Create a Custom External Authentication Provider . Assuming you already have Client ID , Client Secret , Scope , Access Token , Authorization and User Infor URL. Step 1 - Created a Custom Meta-Data to hold Endpoints and Authentication Details Objec...