SlideShare una empresa de Scribd logo
1 de 10
Descargar para leer sin conexión
Implementing Open
Authentication in your App
     OAuth2.0 / Individual OAuth Service
   [Office's Weekly Session] @ WNeeds.com
Why need open authentication?

● This process will give a life to users who come on your app
  but don't want to see a large size registration form
● Every user will try your app by simply doing the one click
  registration/login 
● Thus It will give a large number of users to your
  application
● Your app will be social on internet via these users
  permissions
● This is smart and modern at a glance
How it can be done?

Using OAuth2.0                     Using lib/class of
                                   individual web
 ● Very easy to use in your app    services
 ● Supports major social
   network's authentication
   flow                             ● Using twitteroauth for
 ● facebook, Google, LinkedIn,        implementing
   Windows Live ...                   [authentication by
 ● Doesn't supports                   twiiter]
   Twitter: https://dev.twitter.    ●  Any other web service's
  com/discussions/397
                                      API
Standard work flow of any of these

 
Three different steps:

     user authentication
     User authentication ensures that the user is who they say they are
    app authorization
    App authorization ensures that the user knows exactly what data and   
     capabilities they are providing to your app
    Need: app_id, redirect_uri
    app authentication
    App authentication ensures that the user is giving their information to 
      your
      app and not someone else
      Need: authorization_code, app_secret, redirect_uri
For knowing about OAuth2.0
http://hueniverse.com/2010/05/introducing-oauth-2-0/
Authentication Using OAuth2.0
1. Download OAuth2.0 from here: http://raynux.
com/ray/labs/projects/oauth2.zip

2. Configure [config.php] according to services you want to
implement in your app for authentication
  OAuth2Consumer::getInstance('Facebook', array(
   'client_id' => '...........',
   'client_secret' => '...........',
3. Use the authorization method in any link/button any where
  OAuth2Consumer::getInstance('Facebook')
         ->authorize();
4. Use any method for example grabbing access token, 
        $oauth = OAuth2Consumer::getInstance('Facebook');
        $accessToken = $oauth->getAccessToken();
       Or getting  user data etc
     $friends = $oauth->api('me/friendlists');
Using API of Individual                     WebSr Ex basic auth by twitter
1. To get/create [consumer key], [consumer secret] and for
basic app URL setup go here: https://dev.twitter.com/apps

2. Get [twitteroauth.php] and [OAuth.php] by downloading
twitter recommended example for PHP app from here: https:
//github.com/abraham/twitteroauth/ 

3. To Get [oauth_token], [oauth_token_secret]
    $twitteroauth = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);
    $request_token = $twitteroauth
            ->getRequestToken('TWITTER_CALLBACK_URL');
4. Then to get [access_token] using [oauth_verifier]
    $twitteroauth = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET,
                        [oauth_token], [oauth_token_secret]);
    $access_token = $twitteroauth->getAccessToken($_GET['oauth_verifier']);
continue ...

5. For getting user data:
    $userInfo = $twitteroauth->get('account/verify_credentials');
Lets Discuss

Más contenido relacionado

Destacado (6)

Mood
MoodMood
Mood
 
Prueba 1
Prueba 1Prueba 1
Prueba 1
 
Univision radio;
Univision radio;Univision radio;
Univision radio;
 
Regional Mexican - 27 sts
Regional Mexican - 27 stsRegional Mexican - 27 sts
Regional Mexican - 27 sts
 
Final Presentation
Final PresentationFinal Presentation
Final Presentation
 
Reti D\'Imprese
Reti D\'ImpreseReti D\'Imprese
Reti D\'Imprese
 

Similar a Implementing open authentication_in_your_app

Stateless Auth using OAuth2 & JWT
Stateless Auth using OAuth2 & JWTStateless Auth using OAuth2 & JWT
Stateless Auth using OAuth2 & JWTGaurav Roy
 
Stateless Auth using OAUTH2 & JWT
Stateless Auth using OAUTH2 & JWTStateless Auth using OAUTH2 & JWT
Stateless Auth using OAUTH2 & JWTMobiliya
 
#2 connected apps_calicut_31_july
#2 connected apps_calicut_31_july#2 connected apps_calicut_31_july
#2 connected apps_calicut_31_julyJohnMathewPhilip
 
OAuth with Salesforce - Demystified
OAuth with Salesforce - DemystifiedOAuth with Salesforce - Demystified
OAuth with Salesforce - DemystifiedCalvin Noronha
 
1000 ways to die in mobile oauth
1000 ways to die in mobile oauth1000 ways to die in mobile oauth
1000 ways to die in mobile oauthPriyanka Aash
 
Intro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID ConnectIntro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID ConnectLiamWadman
 
MuleSoft_Meetup__Official__updated_Sep_2020_ (1) (1).pptx
MuleSoft_Meetup__Official__updated_Sep_2020_ (1) (1).pptxMuleSoft_Meetup__Official__updated_Sep_2020_ (1) (1).pptx
MuleSoft_Meetup__Official__updated_Sep_2020_ (1) (1).pptxShiva Sahu
 
OAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID ConnectOAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID ConnectJacob Combs
 
The Many Flavors of OAuth - Understand Everything About OAuth2
The Many Flavors of OAuth - Understand Everything About OAuth2The Many Flavors of OAuth - Understand Everything About OAuth2
The Many Flavors of OAuth - Understand Everything About OAuth2Khor SoonHin
 
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Aaron Parecki
 
APIdays Paris 2018 - Learning the OAuth Dance (Without Stepping on Anyone's T...
APIdays Paris 2018 - Learning the OAuth Dance (Without Stepping on Anyone's T...APIdays Paris 2018 - Learning the OAuth Dance (Without Stepping on Anyone's T...
APIdays Paris 2018 - Learning the OAuth Dance (Without Stepping on Anyone's T...apidays
 
Oauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 supportOauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 supportGaurav Sharma
 
Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Microservice security with spring security 5.1,Oauth 2.0 and open id connect Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Microservice security with spring security 5.1,Oauth 2.0 and open id connect Nilanjan Roy
 
Flaws in Oauth 2.0 Can Oauth be used as a Security Server
Flaws in Oauth 2.0 Can Oauth be used as a Security ServerFlaws in Oauth 2.0 Can Oauth be used as a Security Server
Flaws in Oauth 2.0 Can Oauth be used as a Security Serverijtsrd
 
Devteach 2017 OAuth and Open id connect demystified
Devteach 2017 OAuth and Open id connect demystifiedDevteach 2017 OAuth and Open id connect demystified
Devteach 2017 OAuth and Open id connect demystifiedTaswar Bhatti
 

Similar a Implementing open authentication_in_your_app (20)

Stateless Auth using OAuth2 & JWT
Stateless Auth using OAuth2 & JWTStateless Auth using OAuth2 & JWT
Stateless Auth using OAuth2 & JWT
 
Stateless Auth using OAUTH2 & JWT
Stateless Auth using OAUTH2 & JWTStateless Auth using OAUTH2 & JWT
Stateless Auth using OAUTH2 & JWT
 
Introduction to OAuth2
Introduction to OAuth2Introduction to OAuth2
Introduction to OAuth2
 
OAuth Android Göteborg
OAuth Android GöteborgOAuth Android Göteborg
OAuth Android Göteborg
 
#2 connected apps_calicut_31_july
#2 connected apps_calicut_31_july#2 connected apps_calicut_31_july
#2 connected apps_calicut_31_july
 
OAuth with Salesforce - Demystified
OAuth with Salesforce - DemystifiedOAuth with Salesforce - Demystified
OAuth with Salesforce - Demystified
 
1000 ways to die in mobile oauth
1000 ways to die in mobile oauth1000 ways to die in mobile oauth
1000 ways to die in mobile oauth
 
Intro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID ConnectIntro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID Connect
 
OAuth in the Wild
OAuth in the WildOAuth in the Wild
OAuth in the Wild
 
MuleSoft_Meetup__Official__updated_Sep_2020_ (1) (1).pptx
MuleSoft_Meetup__Official__updated_Sep_2020_ (1) (1).pptxMuleSoft_Meetup__Official__updated_Sep_2020_ (1) (1).pptx
MuleSoft_Meetup__Official__updated_Sep_2020_ (1) (1).pptx
 
OAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID ConnectOAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID Connect
 
The Many Flavors of OAuth - Understand Everything About OAuth2
The Many Flavors of OAuth - Understand Everything About OAuth2The Many Flavors of OAuth - Understand Everything About OAuth2
The Many Flavors of OAuth - Understand Everything About OAuth2
 
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
 
APIdays Paris 2018 - Learning the OAuth Dance (Without Stepping on Anyone's T...
APIdays Paris 2018 - Learning the OAuth Dance (Without Stepping on Anyone's T...APIdays Paris 2018 - Learning the OAuth Dance (Without Stepping on Anyone's T...
APIdays Paris 2018 - Learning the OAuth Dance (Without Stepping on Anyone's T...
 
OAuth
OAuthOAuth
OAuth
 
Oauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 supportOauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 support
 
Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Microservice security with spring security 5.1,Oauth 2.0 and open id connect Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Microservice security with spring security 5.1,Oauth 2.0 and open id connect
 
Flaws in Oauth 2.0 Can Oauth be used as a Security Server
Flaws in Oauth 2.0 Can Oauth be used as a Security ServerFlaws in Oauth 2.0 Can Oauth be used as a Security Server
Flaws in Oauth 2.0 Can Oauth be used as a Security Server
 
Devteach 2017 OAuth and Open id connect demystified
Devteach 2017 OAuth and Open id connect demystifiedDevteach 2017 OAuth and Open id connect demystified
Devteach 2017 OAuth and Open id connect demystified
 
OAuth2 primer
OAuth2 primerOAuth2 primer
OAuth2 primer
 

Último

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Último (20)

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

Implementing open authentication_in_your_app

  • 1. Implementing Open Authentication in your App OAuth2.0 / Individual OAuth Service [Office's Weekly Session] @ WNeeds.com
  • 2. Why need open authentication? ● This process will give a life to users who come on your app but don't want to see a large size registration form ● Every user will try your app by simply doing the one click registration/login  ● Thus It will give a large number of users to your application ● Your app will be social on internet via these users permissions ● This is smart and modern at a glance
  • 3. How it can be done? Using OAuth2.0 Using lib/class of individual web ● Very easy to use in your app services ● Supports major social network's authentication flow ● Using twitteroauth for ● facebook, Google, LinkedIn, implementing Windows Live ... [authentication by ● Doesn't supports twiiter] Twitter: https://dev.twitter. ●  Any other web service's com/discussions/397 API
  • 4. Standard work flow of any of these  
  • 5. Three different steps:    user authentication      User authentication ensures that the user is who they say they are     app authorization     App authorization ensures that the user knows exactly what data and         capabilities they are providing to your app     Need: app_id, redirect_uri     app authentication     App authentication ensures that the user is giving their information to        your       app and not someone else       Need: authorization_code, app_secret, redirect_uri
  • 6. For knowing about OAuth2.0 http://hueniverse.com/2010/05/introducing-oauth-2-0/
  • 7. Authentication Using OAuth2.0 1. Download OAuth2.0 from here: http://raynux. com/ray/labs/projects/oauth2.zip 2. Configure [config.php] according to services you want to implement in your app for authentication OAuth2Consumer::getInstance('Facebook', array( 'client_id' => '...........', 'client_secret' => '...........', 3. Use the authorization method in any link/button any where OAuth2Consumer::getInstance('Facebook') ->authorize(); 4. Use any method for example grabbing access token,          $oauth = OAuth2Consumer::getInstance('Facebook'); $accessToken = $oauth->getAccessToken();        Or getting  user data etc $friends = $oauth->api('me/friendlists');
  • 8. Using API of Individual WebSr Ex basic auth by twitter 1. To get/create [consumer key], [consumer secret] and for basic app URL setup go here: https://dev.twitter.com/apps 2. Get [twitteroauth.php] and [OAuth.php] by downloading twitter recommended example for PHP app from here: https: //github.com/abraham/twitteroauth/  3. To Get [oauth_token], [oauth_token_secret]     $twitteroauth = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);     $request_token = $twitteroauth             ->getRequestToken('TWITTER_CALLBACK_URL'); 4. Then to get [access_token] using [oauth_verifier]     $twitteroauth = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET,                         [oauth_token], [oauth_token_secret]);     $access_token = $twitteroauth->getAccessToken($_GET['oauth_verifier']);
  • 9. continue ... 5. For getting user data:     $userInfo = $twitteroauth->get('account/verify_credentials');