Access_token和客户端与devise令牌不对应

时间:2019-05-20 09:00:48

标签: ruby-on-rails devise-token-auth

我正在通过设计sign_in请求标头获得access_token和客户端。 我想将它们用于每个请求身份验证。 但是,当我在数据库中打印devise令牌时,它们与我收到的以前的令牌不匹配。

sign_in informations: 
access_token: 8bMJB3LIHto188j3OA6Bug
client: c8aHf9Us22igRcEGuIa_SA

devise token print:
{"anUnYM65QFV8h-xhKsbatA"=>{"token"=>"$2a$10$WcH10M1gRgmFWqNhSit/Ve9eQKCiJb5LfstAe3Si4.nFl6BFKKM4C", "expiry"=>1559469053}, "l68BudxD6Yp6Tg1zhQ-YkA"=>{"token"=>"$2a$10$vbO0EVwF/bzRGaEMsr7DZePfnKw/x1ehAAc.50/HPE/F6zwXIsnx.", "expiry"=>1559469104, "last_token"=>"$2a$10$oAlMBT8UsLYn2yptE1Przub6qnGJEqSlVpX3G171Ed1uHNgEnOc8e", "updated_at"=>"2019-05-19T09:51:44.294Z"}, "36fIy5As8MuAFf3F5InJlQ"=>{"token"=>"$2a$10$nVMhT1WByD/o/RVONY47VuJP4oAhoJGngOctI.ELCv/0UDf4t7Feq", "expiry"=>1559469111, "last_token"=>"$2a$10$yjeiw/jjtPiNpPHUPfI5Ae7j1Uh4jzzWxjymbgIktDyviMvESjeKu", "updated_at"=>"2019-05-19T09:51:51.422Z"}, "JVs2ca8VKJ3LSLGweZYJEA"=>{"token"=>"$2a$10$RL6RQzqha6MZr6iV7fU7wuWAzLeXmwy.gv.lezbLmcQCXncI02IbG", "expiry"=>1559469112, "last_token"=>"$2a$10$wPKdrwONh6KS3v8qcN6N7eSe.awglZ0urrdJAXrcPC9goEI.QmifO", "updated_at"=>"2019-05-19T09:51:52.528Z"}, "5r6Wb0RUthgeTdqNlzBFIQ"=>{"token"=>"$2a$10$rq4iBzI4CLOnVOqLbnT.0eJGWfmGAQuK92oPcarJPnGJU8rm6ppF2", "expiry"=>1559469113, "last_token"=>"$2a$10$XlGsRUaX4TEmnPHpIicNqOFLeUuNIRj8QxlwuoBbHcXG1ejYqy39e", "updated_at"=>"2019-05-19T09:51:53.579Z"}}

0 个答案:

没有答案