我可以将授权码重定向回重定向url,可以在oauth2.0 playground工具中看到。但是我在client_id,client_secret, grant_type和代码从授权访问server.Here令牌时是重定向URL发送授权代码将帐户与Google Home设备关联时,授权授权流失败
https://oauth-redirect.googleusercontent.com/r/skillid?state=xyz&code=aW1vbml
HTTP/1.1 400错误的请求 内容类型:应用/ 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();
您能否提供有关您正在使用哪个授权流程的其他详细信息(隐式或授权代码)? – Prisoner
我正在使用授权授权代码方法使用apache oltu oauth – abhi