http - Multiple Header Tokens Rails -
in api have before_filter restrict_access
def restrict_access authenticate_or_request_with_http_token |token, options| apikey.exists?(access_token: token) end end
and in header places token (from php wordpress plugin)
'header'=>'authorization: token token="' . $my_access_token . '"'
can send multiple tokens header? access token model accessing , identity token asking it? if how have check 2 different tokens?
you can make 1 large token saving information , cut in rails app , information need.
or can token manually doing this:
def authenticate token = request.headers['custom-auth-token'] apikey.exists?(access_token: token) end
Comments
Post a Comment