Reputation: 195
I am trying to build a ZendFramework2 Rest API and want to implement two-legged OAuth2 authentication.
I have been looking around and can not find any resources to help point me in the right direction with this.
Has anyone done this before or know of a good source I am missing?
Upvotes: 1
Views: 82
Reputation: 44356
In OAuth
you can make access tokens client specific by assigning a client_id
.
This client_id
can be stored in some local storage on the client side and reused on the next user login from that client.
When the user logs in first time from a new client (no client_id
in the storage for this user) then a new client_id
is created and some 2nd verification step can be added to this part of the authentication process. For example sending an text message to his phone number. You could add an expires_at
field to the client table so that you can repeat this process if the client_id
has expired.
Upvotes: 2