目前,devise配置为通过URL接受令牌认证和卷曲效果很好如何配置设计在HTTP标头中接受身份验证令牌?
curl 'http://localhost/index.json?auth_token=TOKENVALUE'
现在,我想通过通过HTTP标头,而不是URL的TOKENVALUE,我该怎么配置设计获得从TOKENVALUE 要么 HTTP标头或 URL?这样,以上的和下面的卷曲请求将工作:如this railscast所示
curl 'http://localhost/index.json' -H 'Authorization: Token token="TOKENVALUE"'
。