SlideShare a Scribd company logo
1 of 14
indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreaminindiadreamin.in info@indiadreamin.in SFindiadreamin @sfindiadreamin
Create custom Authentication
Provider and forget the hassle
of managing tokens
indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin
2 Thanks to our Diamond, Platinum & Gold sponsors
indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin
3
HELLO!
I am Rahul Malhotra
Software Engineer at SaaSfocus
Blogger & YouTuber at SFDC Stop
You can find me at @rahulcoder
indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreaminindiadreamin.in info@indiadreamin SFindiadreamin @sfindiadreamin
What is API ?
API stands for Application Programming Interface.
4
indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin
5 Most common methods for authentication
▹ No Authentication
▹ Basic Authentication
▹ OAuth 1.0
▹ OAuth 2.0
indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin
”indiadreamin.in info@indiadreamin SFindiadreamin @sfindiadreamin
“Trust is Salesforce’s number 1 value and it
has to be the highest value in your company”
6
- Marc Benioff
indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreaminindiadreamin.in info@indiadreamin SFindiadreamin @sfindiadreamin
What is Authentication
Provider ?
Authentication providers are used to prove the identity of users. Salesforce
provides a number of inbuilt authentication providers to connect your org with
popular applications like:- Google, Facebook etc.
7
indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin
8
▹ Authenticate once, use multiple times.
▹ If the access token is expired, Salesforce will automatically use the refresh
token to get a new access token from the 3rd party server.
▹ 3 Legged Authentication mechanism can be implemented which makes
user authentication much more secure and powerful.
▹ You don’t need to worry about the authentication headers as these are
automatically added while making the requests.
Why do we need a custom Authentication
Provider ?
indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin
9
Basic OAuth Flows
USERNAME - PASSWORD FLOW
▹ In this flow, you send the client id,
client secret, username and
password to the access token URL to
get the access token.
▹ The access token is then passed in
header in subsequent requests.
AUTHORIZATION CODE FLOW
▹ In this flow, you send the client id, client
secret and callback URL to the authorization
URL which redirects you to the login screen.
▹ After logging in, it takes you to the callback
URL with a code appended at the end.
▹ Callback URL redirects it to the access token
URL along with the unique code which
ultimately provides the access token and
optionally, a refresh token.
indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin
10 OAuth Flow
Authorization URL
Code sent to
Callback URL
Access Token URL
Access Token
in Response
1.
2.
Connected
App on
Server
indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin
11
It’s Time to Code
indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin
12
Boilerplate code and My references
GitHub Repository
This github repository consists of
whole code of this demo as well
as a template for you to use and
customize.
https://github.com/rahulmalhotr
a/Salesforce-Custom-
Authentication-Provider-
Template
SFDC Stop Blog
For the detailed explanation and
video of the same visit my blog
on the link given below.
https://sfdcstop.blogspot.com/2
018/11/create-custom-
authentication-provider.html
Presentation
This presentation will be
available at the slideshare link
given below.
https://www.slideshare.net/Rahu
lMalhotra98/create-custom-
authentication-provider-and-
forget-the-hassle-of-managing-
tokens-id18
indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin
13
▹ Apex Developer Guide:- https://developer.salesforce.com/docs/atlas.en-
us.apexcode.meta/apexcode/authproviderplugin.htm
▹ AuthProviderPluginClass:-
https://developer.salesforce.com/docs/atlas.en-
us.apexcode.meta/apexcode/apex_class_Auth_AuthProviderPluginClass.h
tm
Deep dive into custom Authentication Plugin
indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin
14
THANKS!
Any questions?
You can find me at
▹ @rahulcoder
▹ rahulmalhotra.github.io
www.sfdcstop.blogspot.com

More Related Content

Similar to Create custom authentication provider and forget the hassle of managing tokens ID18

Secure your api from basics to beyond
Secure your api   from basics to beyondSecure your api   from basics to beyond
Secure your api from basics to beyondAlexandre Faria
 
Stateless authentication for microservices - Spring I/O 2015
Stateless authentication for microservices  - Spring I/O 2015Stateless authentication for microservices  - Spring I/O 2015
Stateless authentication for microservices - Spring I/O 2015Alvaro Sanchez-Mariscal
 
Secure your api - from basics to beyond
Secure your api - from basics to beyondSecure your api - from basics to beyond
Secure your api - from basics to beyondAlexandre Faria
 
CIS14: An Overview of FIDO's Universal Factor (UAF) Specifications
CIS14: An Overview of FIDO's Universal Factor (UAF) SpecificationsCIS14: An Overview of FIDO's Universal Factor (UAF) Specifications
CIS14: An Overview of FIDO's Universal Factor (UAF) SpecificationsCloudIDSummit
 
Stateless authentication for microservices - GR8Conf 2015
Stateless authentication for microservices - GR8Conf 2015Stateless authentication for microservices - GR8Conf 2015
Stateless authentication for microservices - GR8Conf 2015Alvaro Sanchez-Mariscal
 
Stateless authentication for microservices - Greach 2015
Stateless authentication for microservices - Greach 2015Stateless authentication for microservices - Greach 2015
Stateless authentication for microservices - Greach 2015Alvaro Sanchez-Mariscal
 
CIS 2015 Mobile SSO
CIS 2015 Mobile SSOCIS 2015 Mobile SSO
CIS 2015 Mobile SSOAshish Jain
 
FIDO UAF Specifications: Overview & Tutorial
FIDO UAF Specifications: Overview & Tutorial FIDO UAF Specifications: Overview & Tutorial
FIDO UAF Specifications: Overview & Tutorial FIDO Alliance
 
The “I” in API is for Identity (Nordic APIS April 2014)
The “I” in API is for Identity (Nordic APIS April 2014)The “I” in API is for Identity (Nordic APIS April 2014)
The “I” in API is for Identity (Nordic APIS April 2014)Nordic APIs
 
Droidcon Paris: The new Android SDK
Droidcon Paris: The new Android SDKDroidcon Paris: The new Android SDK
Droidcon Paris: The new Android SDKPayPal
 
Slide 1 - Authenticated Reseller SSL Certificate Authority
Slide 1 - Authenticated Reseller SSL Certificate AuthoritySlide 1 - Authenticated Reseller SSL Certificate Authority
Slide 1 - Authenticated Reseller SSL Certificate Authoritywebhostingguy
 
Authentication Made Simple - Exploring QR Auto Login in Flutter.pdf
Authentication Made Simple - Exploring QR Auto Login in Flutter.pdfAuthentication Made Simple - Exploring QR Auto Login in Flutter.pdf
Authentication Made Simple - Exploring QR Auto Login in Flutter.pdfFlutter Agency
 
CIS 2015 SSO for Mobile and Web Apps Ashish Jain
CIS 2015 SSO for Mobile and Web Apps Ashish JainCIS 2015 SSO for Mobile and Web Apps Ashish Jain
CIS 2015 SSO for Mobile and Web Apps Ashish JainCloudIDSummit
 
CIS 2015- SSO for Mobile and Web Apps- Ashish Jain
CIS 2015- SSO for Mobile and Web Apps- Ashish JainCIS 2015- SSO for Mobile and Web Apps- Ashish Jain
CIS 2015- SSO for Mobile and Web Apps- Ashish JainCloudIDSummit
 
FIDO Specifications Overview
FIDO Specifications OverviewFIDO Specifications Overview
FIDO Specifications OverviewFIDO Alliance
 
OAuth2 and OpenID with Spring Boot
OAuth2 and OpenID with Spring BootOAuth2 and OpenID with Spring Boot
OAuth2 and OpenID with Spring BootGeert Pante
 
ForgeRock and Trusona - Simplifying the Multi-factor User Experience
ForgeRock and Trusona - Simplifying the Multi-factor User ExperienceForgeRock and Trusona - Simplifying the Multi-factor User Experience
ForgeRock and Trusona - Simplifying the Multi-factor User ExperienceForgeRock
 

Similar to Create custom authentication provider and forget the hassle of managing tokens ID18 (20)

Secure your api from basics to beyond
Secure your api   from basics to beyondSecure your api   from basics to beyond
Secure your api from basics to beyond
 
Stateless authentication for microservices - Spring I/O 2015
Stateless authentication for microservices  - Spring I/O 2015Stateless authentication for microservices  - Spring I/O 2015
Stateless authentication for microservices - Spring I/O 2015
 
Secure your api - from basics to beyond
Secure your api - from basics to beyondSecure your api - from basics to beyond
Secure your api - from basics to beyond
 
CIS14: An Overview of FIDO's Universal Factor (UAF) Specifications
CIS14: An Overview of FIDO's Universal Factor (UAF) SpecificationsCIS14: An Overview of FIDO's Universal Factor (UAF) Specifications
CIS14: An Overview of FIDO's Universal Factor (UAF) Specifications
 
Stateless authentication for microservices - GR8Conf 2015
Stateless authentication for microservices - GR8Conf 2015Stateless authentication for microservices - GR8Conf 2015
Stateless authentication for microservices - GR8Conf 2015
 
Stateless authentication for microservices - Greach 2015
Stateless authentication for microservices - Greach 2015Stateless authentication for microservices - Greach 2015
Stateless authentication for microservices - Greach 2015
 
CIS 2015 Mobile SSO
CIS 2015 Mobile SSOCIS 2015 Mobile SSO
CIS 2015 Mobile SSO
 
FIDO UAF Specifications: Overview & Tutorial
FIDO UAF Specifications: Overview & Tutorial FIDO UAF Specifications: Overview & Tutorial
FIDO UAF Specifications: Overview & Tutorial
 
The “I” in API is for Identity (Nordic APIS April 2014)
The “I” in API is for Identity (Nordic APIS April 2014)The “I” in API is for Identity (Nordic APIS April 2014)
The “I” in API is for Identity (Nordic APIS April 2014)
 
Droidcon Paris: The new Android SDK
Droidcon Paris: The new Android SDKDroidcon Paris: The new Android SDK
Droidcon Paris: The new Android SDK
 
OAuth 2.0
OAuth 2.0OAuth 2.0
OAuth 2.0
 
Slide 1 - Authenticated Reseller SSL Certificate Authority
Slide 1 - Authenticated Reseller SSL Certificate AuthoritySlide 1 - Authenticated Reseller SSL Certificate Authority
Slide 1 - Authenticated Reseller SSL Certificate Authority
 
Authentication Made Simple - Exploring QR Auto Login in Flutter.pdf
Authentication Made Simple - Exploring QR Auto Login in Flutter.pdfAuthentication Made Simple - Exploring QR Auto Login in Flutter.pdf
Authentication Made Simple - Exploring QR Auto Login in Flutter.pdf
 
CIS 2015 SSO for Mobile and Web Apps Ashish Jain
CIS 2015 SSO for Mobile and Web Apps Ashish JainCIS 2015 SSO for Mobile and Web Apps Ashish Jain
CIS 2015 SSO for Mobile and Web Apps Ashish Jain
 
CIS 2015- SSO for Mobile and Web Apps- Ashish Jain
CIS 2015- SSO for Mobile and Web Apps- Ashish JainCIS 2015- SSO for Mobile and Web Apps- Ashish Jain
CIS 2015- SSO for Mobile and Web Apps- Ashish Jain
 
FIDO Specifications Overview
FIDO Specifications OverviewFIDO Specifications Overview
FIDO Specifications Overview
 
Introduction to OAuth
Introduction to OAuthIntroduction to OAuth
Introduction to OAuth
 
OAuth2 primer
OAuth2 primerOAuth2 primer
OAuth2 primer
 
OAuth2 and OpenID with Spring Boot
OAuth2 and OpenID with Spring BootOAuth2 and OpenID with Spring Boot
OAuth2 and OpenID with Spring Boot
 
ForgeRock and Trusona - Simplifying the Multi-factor User Experience
ForgeRock and Trusona - Simplifying the Multi-factor User ExperienceForgeRock and Trusona - Simplifying the Multi-factor User Experience
ForgeRock and Trusona - Simplifying the Multi-factor User Experience
 

More from Rahul Malhotra

The importance of Data Structures in Salesforce Development | Live Session at...
The importance of Data Structures in Salesforce Development | Live Session at...The importance of Data Structures in Salesforce Development | Live Session at...
The importance of Data Structures in Salesforce Development | Live Session at...Rahul Malhotra
 
Getting Started with Lightning Web Components | LWC | Salesforce
Getting Started with Lightning Web Components | LWC | SalesforceGetting Started with Lightning Web Components | LWC | Salesforce
Getting Started with Lightning Web Components | LWC | SalesforceRahul Malhotra
 
Dreamforce 2018 Locker Service
Dreamforce 2018 Locker ServiceDreamforce 2018 Locker Service
Dreamforce 2018 Locker ServiceRahul Malhotra
 
Salesforce UI API (TDXGG'18)
Salesforce UI API (TDXGG'18)Salesforce UI API (TDXGG'18)
Salesforce UI API (TDXGG'18)Rahul Malhotra
 
Lightning Testing Service
Lightning Testing ServiceLightning Testing Service
Lightning Testing ServiceRahul Malhotra
 
Lightning Data Service
Lightning Data ServiceLightning Data Service
Lightning Data ServiceRahul Malhotra
 

More from Rahul Malhotra (6)

The importance of Data Structures in Salesforce Development | Live Session at...
The importance of Data Structures in Salesforce Development | Live Session at...The importance of Data Structures in Salesforce Development | Live Session at...
The importance of Data Structures in Salesforce Development | Live Session at...
 
Getting Started with Lightning Web Components | LWC | Salesforce
Getting Started with Lightning Web Components | LWC | SalesforceGetting Started with Lightning Web Components | LWC | Salesforce
Getting Started with Lightning Web Components | LWC | Salesforce
 
Dreamforce 2018 Locker Service
Dreamforce 2018 Locker ServiceDreamforce 2018 Locker Service
Dreamforce 2018 Locker Service
 
Salesforce UI API (TDXGG'18)
Salesforce UI API (TDXGG'18)Salesforce UI API (TDXGG'18)
Salesforce UI API (TDXGG'18)
 
Lightning Testing Service
Lightning Testing ServiceLightning Testing Service
Lightning Testing Service
 
Lightning Data Service
Lightning Data ServiceLightning Data Service
Lightning Data Service
 

Recently uploaded

WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburgmasabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...masabamasaba
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 

Recently uploaded (20)

WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 

Create custom authentication provider and forget the hassle of managing tokens ID18

  • 1. indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreaminindiadreamin.in info@indiadreamin.in SFindiadreamin @sfindiadreamin Create custom Authentication Provider and forget the hassle of managing tokens
  • 2. indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin 2 Thanks to our Diamond, Platinum & Gold sponsors
  • 3. indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin 3 HELLO! I am Rahul Malhotra Software Engineer at SaaSfocus Blogger & YouTuber at SFDC Stop You can find me at @rahulcoder
  • 4. indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreaminindiadreamin.in info@indiadreamin SFindiadreamin @sfindiadreamin What is API ? API stands for Application Programming Interface. 4
  • 5. indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin 5 Most common methods for authentication ▹ No Authentication ▹ Basic Authentication ▹ OAuth 1.0 ▹ OAuth 2.0
  • 6. indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin ”indiadreamin.in info@indiadreamin SFindiadreamin @sfindiadreamin “Trust is Salesforce’s number 1 value and it has to be the highest value in your company” 6 - Marc Benioff
  • 7. indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreaminindiadreamin.in info@indiadreamin SFindiadreamin @sfindiadreamin What is Authentication Provider ? Authentication providers are used to prove the identity of users. Salesforce provides a number of inbuilt authentication providers to connect your org with popular applications like:- Google, Facebook etc. 7
  • 8. indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin 8 ▹ Authenticate once, use multiple times. ▹ If the access token is expired, Salesforce will automatically use the refresh token to get a new access token from the 3rd party server. ▹ 3 Legged Authentication mechanism can be implemented which makes user authentication much more secure and powerful. ▹ You don’t need to worry about the authentication headers as these are automatically added while making the requests. Why do we need a custom Authentication Provider ?
  • 9. indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin 9 Basic OAuth Flows USERNAME - PASSWORD FLOW ▹ In this flow, you send the client id, client secret, username and password to the access token URL to get the access token. ▹ The access token is then passed in header in subsequent requests. AUTHORIZATION CODE FLOW ▹ In this flow, you send the client id, client secret and callback URL to the authorization URL which redirects you to the login screen. ▹ After logging in, it takes you to the callback URL with a code appended at the end. ▹ Callback URL redirects it to the access token URL along with the unique code which ultimately provides the access token and optionally, a refresh token.
  • 10. indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin 10 OAuth Flow Authorization URL Code sent to Callback URL Access Token URL Access Token in Response 1. 2. Connected App on Server
  • 11. indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin 11 It’s Time to Code
  • 12. indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin 12 Boilerplate code and My references GitHub Repository This github repository consists of whole code of this demo as well as a template for you to use and customize. https://github.com/rahulmalhotr a/Salesforce-Custom- Authentication-Provider- Template SFDC Stop Blog For the detailed explanation and video of the same visit my blog on the link given below. https://sfdcstop.blogspot.com/2 018/11/create-custom- authentication-provider.html Presentation This presentation will be available at the slideshare link given below. https://www.slideshare.net/Rahu lMalhotra98/create-custom- authentication-provider-and- forget-the-hassle-of-managing- tokens-id18
  • 13. indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin 13 ▹ Apex Developer Guide:- https://developer.salesforce.com/docs/atlas.en- us.apexcode.meta/apexcode/authproviderplugin.htm ▹ AuthProviderPluginClass:- https://developer.salesforce.com/docs/atlas.en- us.apexcode.meta/apexcode/apex_class_Auth_AuthProviderPluginClass.h tm Deep dive into custom Authentication Plugin
  • 14. indiadreamin.in info@indiadreamin Sfindiadreamin @sfindiadreamin 14 THANKS! Any questions? You can find me at ▹ @rahulcoder ▹ rahulmalhotra.github.io www.sfdcstop.blogspot.com