06-26 12:20:58.832 5293-7833/com.infortec.angel.montalbanwebser D/RETROFIT﹕ Authorization: JWT {token:<token>}06-26 12:20:58.842 5293-7833/com.infortec.angel.montalbanwebser D/RETROFIT﹕ ---> END http (no body)06-26 12:20:59.322 5293-7833/com.infortec.angel.montalbanwebser D/RETROFIT﹕ : http/1.0 403 FORBIDDEN06-26 12:20:59.332 5293-7833/com.infortec.angel.montalbanwebser D/RETROFIT﹕ Allow: GET,POST,head,OPTIONS06-26 12:20:59.332 5293-7833/com.infortec.angel.montalbanwebser D/RETROFIT﹕ Content-Type: application/Json06-26 12:20:59.332 5293-7833/com.infortec.angel.montalbanwebser D/RETROFIT﹕ Date: Fri,26 Jun 2015 10:19:34 GMT06-26 12:20:59.332 5293-7833/com.infortec.angel.montalbanwebser D/RETROFIT﹕ Server: WsgiServer/0.1 Python/2.7.306-26 12:20:59.332 5293-7833/com.infortec.angel.montalbanwebser D/RETROFIT﹕ vary: Accept,cookie06-26 12:20:59.332 5293-7833/com.infortec.angel.montalbanwebser D/RETROFIT﹕ X-AndroID-Received-Millis: 143531405932106-26 12:20:59.332 5293-7833/com.infortec.angel.montalbanwebser D/RETROFIT﹕ X-AndroID-Response-Source: NETWORK 40306-26 12:20:59.332 5293-7833/com.infortec.angel.montalbanwebser D/RETROFIT﹕ X-AndroID-Selected-Transport: http/1.106-26 12:20:59.332 5293-7833/com.infortec.angel.montalbanwebser D/RETROFIT﹕ X-AndroID-Sent-Millis: 143531405929606-26 12:20:59.332 5293-7833/com.infortec.angel.montalbanwebser D/RETROFIT﹕ x-frame-options: SAMEORIGIN06-26 12:20:59.342 5293-7833/com.infortec.angel.montalbanwebser D/RETROFIT﹕ {"detail":"Error deCoding signature."}06-26 12:20:59.342 5293-7833/com.infortec.angel.montalbanwebser D/RETROFIT﹕ <--- END http (38-byte body)
{“detail”:”Error deCoding signature.”}
编辑:我正在使用RequestInterceptor来添加我的标题.
public class TokenRequestInterceptor implements RequestInterceptor{ @OverrIDe public voID intercept(RequestFacade request) { request.addheader("Content-Type","application/Json"); request.addheader("Authorization","JWT " + Utils.token); }}
Utils.token是一个静态字段,我在验证后从服务器检索它时存储令牌.
解决方法 D / RETROFIT:授权:JWT {token:< token>}我认为您的问题是您将令牌作为Json对象发送而不是发送令牌本身:
D / RETROFIT:授权:JWT< token>
如果您希望将令牌作为Json发送,则应将其发送到正文而不是Authorization标头中.
$curl -X POST -H“Content-Type:application / Json”-d'{“token”:“< TOKEN>”}’URL
总结以上是内存溢出为你收集整理的错误decodin签名JWT身份验证Android全部内容,希望文章能够帮你解决错误decodin签名JWT身份验证Android所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)