PHP Classes

pin based authorization

Recommend this page to a friend!

      PHP OAuth Library  >  PHP OAuth Library package blog  >  How to Implement a PH...  >  All threads  >  pin based authorization  >  (Un) Subscribe thread alerts  
Subject:pin based authorization
Summary:how to implement pin based autherization
Messages:4
Author:Sagar Patil
Date:2015-11-24 05:49:40
 

  1. pin based authorization   Reply   Report abuse  
Picture of Sagar Patil Sagar Patil - 2015-11-24 05:49:40
I am creating an PHP application using PHP OAuth API ,
after making api call it redirects back to the client application site and after allowing access from client application site it redirects back to the calling appication.
this happens for every api call which I don't want.

Does I have to store oauth_token and oauth_verifier somewhere?
Is the pin based authorization is the solution?
if yes then how can I set up this?

please provide example code .


  2. Re: pin based authorization   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2015-11-24 05:57:27 - In reply to message 1 from Sagar Patil
No, by default the class stores authorization in session variables. As long as you are making calls to the API when the user is accessing your pages, session variables are OK. The class takes care of the storage, you do not have to be concerned how it works internally.

  3. Re: pin based authorization   Reply   Report abuse  
Picture of Sagar Patil Sagar Patil - 2015-11-24 09:29:15 - In reply to message 2 from Manuel Lemos
every time application starts it requests for new authorization.
how to store the authorization permanently instead of storing in session variables?

  4. Re: pin based authorization   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2015-11-24 17:46:53 - In reply to message 3 from Sagar Patil
There are other sub-classes that can store tokens in persistent storage that do not require the user to be present like databases or files.

Here is one article on using the sub-classes to store tokens in databases.

phpclasses.org/blog/package/7700/po ...