rest - Implementing access token architecture in my API -
my app logic (android, ios , web) written in server.
since things got complicated, decided build server rest web service querying contain logic in header.
my login flow pretty simple, , somehow tried copy facebook api:
- the user login facebook.
- the user receive facebook access token
- the access token sent server other identifiers
- the server checks facebook access token valid facebook , other identifiers match ones on facebook.
- the server returns access token user, should use in each query until expires.
the problem didn't add other restrictions endpoints limitations (scopes) , stuff this, access token generated server grant access each part of api.
i think inventing wheel here foolish, i'm looking framework or generic solution allow me add logic access tokens in simple way.
i read oauth, concern more user sharing other users, want use login flow , scope protector.
is possible oauth ? there alternative oauth ?
that's possible oauth 2.0 , in fact 1 of objectives: may issue , use access tokens have particular "scopes" (an oauth 2.0 concept) associated them relate permissions client has (e.g. read/write, api a, api b).
but need issue own access tokens own authorization server. allow users login authorization server facebook account.
Comments
Post a Comment