• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Implementing open authentication_in_your_app

Implementing open authentication_in_your_app



Office Weekly Session

Office Weekly Session



Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    Implementing open authentication_in_your_app Implementing open authentication_in_your_app Presentation Transcript

    • Implementing OpenAuthentication in your App OAuth2.0 / Individual OAuth Service [Offices Weekly Session] @ WNeeds.com
    • Why need open authentication?● This process will give a life to users who come on your app but dont 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 networks authentication flow ● Using twitteroauth for ● facebook, Google, LinkedIn, implementing Windows Live ... [authentication by ● Doesnt supports twiiter] Twitter: https://dev.twitter. ●  Any other web services 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.0http://hueniverse.com/2010/05/introducing-oauth-2-0/
    • Authentication Using OAuth2.01. Download OAuth2.0 from here: http://raynux.com/ray/labs/projects/oauth2.zip2. Configure [config.php] according to services you want toimplement 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 twitter1. To get/create [consumer key], [consumer secret] and forbasic app URL setup go here: https://dev.twitter.com/apps2. Get [twitteroauth.php] and [OAuth.php] by downloadingtwitter 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