api - Securing Restful Web Services with OAuth2 with JWT -
hi new apache cxf rest api security side.i want rest api have security authorization.i found apache cxf gives ouath2 security features(http://cxf.apache.org/docs/jax-rs-oauth2.html).so , need use json web token(http://jwt.io/) send api authorization.simply need use secured line send request rest api.so far have simple design.
and rest api have crud operations database.i thought send jwt access token in request header.and api side verify user , send data user.i have 2 questions.first 1 is best design kind of application.and second 1 if best way how generate tokens , need keep tokens in server side.
yes it's design
i can explain github web api's
authorize
first u validate urself using api sending client id , callback url in request (here u specify access level ie.scope) , u receive code
access_token
then u exchange code access token (this time client secret included in req parameter)
this access token received used future calls made u on behalf of user
nd ya u store token , refresh token @ server
https://developer.github.com/v3/oauth/#web-application-flow
although specific github , similar flow follows twitter , linked in , different facebook web api's
Comments
Post a Comment