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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -