将帐户与Google Home设备关联时,授权授权流程失败

时间:2017-05-05 10:21:26

标签: java rest actions-on-google oltu

我能够将授权代码重定向回重定向网址,这可以在oauth2.0 playground工具中看到。但是当从授权服务器访问令牌时,我在诸如client_id,client_secret,grant_type和代码之类的参数中获取空值。这里是重定向网址发送授权码

  

https://oauth-redirect.googleusercontent.com/r/skillid?state=xyz&code=aW1vbml

     

Http / 1.1 400错误请求   内容类型:application / json;字符集= UTF-8   {     “error_description”:“错误请求”,     “错误”:“invalid_grant”}

OAuthASResponse.OAuthAuthorizationResponseBuilder builder = OAuthASResponse .authorizationResponse(request,HttpServletResponse.SC_FOUND);' builder.setParam("code", token); builder.setParam("state", state); final OAuthResponse response = builder.location(redirectURI).buildQueryMessage(); URI url = new URI(response.getLocationUri()); return Response.status(response.getResponseStatus()).location(url).build();

0 个答案:

没有答案