开发者社区> 问答> 正文

API网关的OpenID Connect 认证失败

我使用文档上的java代码测试,OpenID Connect 认证失败: Request: Url: http://d00f1f77e0aa4b58b4574a218bff0a93-cn-shenzhen.alicloudapi.com/oauth/test?IdToken=eyJhbGciOiJSUzI1NiIsImtpZCI6IjU0NTllNTc0MGU1MTQ3ZWZiMjU0ZDA2NjNjNjIxZTY4In0.eyJqdGkiOiJkZHd3U0VlelZPYkpvUGswR1owVmxnIiwiaWF0IjoxNTMxNDUxNTY5LCJleHAiOjE1MzE0NTE2ODksIm5iZiI6MTUzMTQ1MTUwOSwic3ViIjoiWU9VUl9TVUJKRUNUIiwiYXVkIjoiWU9VUl9BVURJRU5DRSJ9.ICWdNnONQf4wSqQwztcK799lBC7blFYafKLObK6xtKdMwxL9gyY04NlB1uszs2ynAtZw57lKV0aHTvcfV9aihFZcCc6MoRz7ePnGtxZ5tX0NM69OB6Yh--wQGwk6sIp9IlWoozNOaptQkgX80cEonWGXHDph8BVceSExFCMuqUPaEikMMghxQwvvw67pBlvD6tBWyXMpmZPa7yib2NlapDDH5hHBrPqGGSW5fNGE-IAICw02BYULbDea4nlopubqV-8-xznR8cIgR1DzzOREKqkYS43EJ2us3aed_7J5ZisNPHgg6WFhZCTwYw4IXsZn1jpKpLuLHUcdw4IQnDHutQ&tk=12 Header: {"Host":"d00f1f77e0aa4b58b4574a218bff0a93-cn-shenzhen.alicloudapi.com","X-Ca-Timestamp":"1531461329236","gateway_channel":"http","User-Agent":"Apache-HttpClient/4.1.2 (java 1.6)","X-Ca-Request-Mode":"debug","Content-Type":"application/json; charset=utf-8"} Response: 401 Date: Fri, 13 Jul 2018 05:55:29 GMT Content-Type: application/json; charset=UTF-8 Content-Length: 0 Connection: keep-alive Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCH Access-Control-Allow-Headers: X-Requested-With,X-Sequence,X-Ca-Key,X-Ca-Secret,X-Ca-Version,X-Ca-Timestamp,X-Ca-Nonce,X-Ca-API-Key,X-Ca-Stage,X-Ca-Client-DeviceId,X-Ca-Client-AppId,X-Ca-Signature,X-Ca-Signature-Headers,X-Ca-Signature-Method,X-Forwarded-For,X-Ca-Date,X-Ca-Request-Mode,Authorization,Content-Type,Accept,Accept-Ranges,Cache-Control,Range,Content-MD5 Access-Control-Max-Age: 172800 X-Ca-Request-Id: 7895B7FF-67AE-40D4-BB60-12A9F3556811 X-Ca-Error-Message: OpenId Connect Verify Fail: 243, Not found by keyId: 5459e5740e5147efb254d0663c621e68 Latency: 0 我生成的keyPair publicKey={"kty":"RSA","kid":"5459e5740e5147efb254d0663c621e68","alg":"ES256","n":"wi672wnI0wHaKhH_SU0n877nNfCfFt7L9XNsVOJ5FFk3_39b4qPAhCjJkvZOFqVFAm3aHYmoXrCHJDDiNkrMNJAqFJNaWCPsYBKQlK2iOaGMsYb5MAKTvf35pdZZFJLwyIgvSIsafczuDg6EMhzqmTdvb4XlbrQBONTavfqcn62_e6D6VJPPUawKacm6Kz6tXtp1Y5eIB6ZfvvQ2GKR94v1EbmicAAPq3U9pk3e7dyKOwFojq4ygPYdVxWZ7PChffyLS6UYaWRTZpHthfrJo1_iBpMzuTRxb26r3oM_0DCG7G9BCT8ql3j5AizUxf_yLjO48YteYrbljYE7VwW-hCw","e":"AQAB"} privateKey={"kty":"RSA","kid":"5459e5740e5147efb254d0663c621e68","alg":"ES256","n":"wi672wnI0wHaKhH_SU0n877nNfCfFt7L9XNsVOJ5FFk3_39b4qPAhCjJkvZOFqVFAm3aHYmoXrCHJDDiNkrMNJAqFJNaWCPsYBKQlK2iOaGMsYb5MAKTvf35pdZZFJLwyIgvSIsafczuDg6EMhzqmTdvb4XlbrQBONTavfqcn62_e6D6VJPPUawKacm6Kz6tXtp1Y5eIB6ZfvvQ2GKR94v1EbmicAAPq3U9pk3e7dyKOwFojq4ygPYdVxWZ7PChffyLS6UYaWRTZpHthfrJo1_iBpMzuTRxb26r3oM_0DCG7G9BCT8ql3j5AizUxf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C3qBHJZ5mSPE","qi":"SS2UnZmQ0s5-rKEM5peY7Y4zDo1ezzuRkVxSpyp6mu62pl-OUDmVi5cQ2bbK3U7uAOfZlZgG0uOOADXwZuQns6bEZ5iUG3mH_P5KItP8h55BDxPX-TWE_ksfLHj0_NLuqvciZUinUMBv-sa3-Gmk8_HZwIHUtBNx4urWKwlDNHQ"} idToken=eyJhbGciOiJSUzI1NiIsImtpZCI6IjU0NTllNTc0MGU1MTQ3ZWZiMjU0ZDA2NjNjNjIxZTY4In0.eyJqdGkiOiJkZHd3U0VlelZPYkpvUGswR1owVmxnIiwiaWF0IjoxNTMxNDUxNTY5LCJleHAiOjE1MzE0NTE2ODksIm5iZiI6MTUzMTQ1MTUwOSwic3ViIjoiWU9VUl9TVUJKRUNUIiwiYXVkIjoiWU9VUl9BVURJRU5DRSJ9.ICWdNnONQf4wSqQwztcK799lBC7blFYafKLObK6xtKdMwxL9gyY04NlB1uszs2ynAtZw57lKV0aHTvcfV9aihFZcCc6MoRz7ePnGtxZ5tX0NM69OB6Yh--wQGwk6sIp9IlWoozNOaptQkgX80cEonWGXHDph8BVceSExFCMuqUPaEikMMghxQwvvw67pBlvD6tBWyXMpmZPa7yib2NlapDDH5hHBrPqGGSW5fNGE-IAICw02BYULbDea4nlopubqV-8-xznR8cIgR1DzzOREKqkYS43EJ2us3aed_7J5ZisNPHgg6WFhZCTwYw4IXsZn1jpKpLuLHUcdw4IQnDHutQ

展开
收起
xbull-lzy 2018-07-13 18:10:55 4051 0
2 条回答
写回答
取消 提交回答
问答分类:
问答地址:
相关产品:
问答排行榜
最热
最新

相关电子书

更多
API 网关实践 立即下载
API网关实践 立即下载
云服务总线 CSB App Connect 简介 v1.0 直播 立即下载