Commit bc673146 authored by Quxl's avatar Quxl

x

parent c1deebfc
......@@ -21,6 +21,7 @@ import org.apache.oltu.oauth2.common.OAuth;
import org.apache.oltu.oauth2.common.exception.OAuthProblemException;
import org.apache.oltu.oauth2.common.message.types.GrantType;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
public interface OAuthApi {
......@@ -88,6 +89,7 @@ public interface OAuthApi {
default void callback() {
try {
HttpServletRequest request = this.getHttpServletRequest();
logger.debug("oauth callback: " + request.getRequestURI() + " " + JSON.toJSONString(request.getParameterMap()));
OAuthConfig config = this.getOAuthConfig();
OAuthAuthzResponse oauthAuthzResponse = OAuthAuthzResponse.oauthCodeAuthzResponse(request);
String code = oauthAuthzResponse.getCode();
......@@ -153,6 +155,7 @@ public interface OAuthApi {
String idToken = oAuthResponse.getParam("id_token");
String tokenType = oAuthResponse.getTokenType();
OAuthToken newToken = new OAuthToken(accessToken, refreshToken, idToken, tokenType, expiresIn);
logger.debug("oauth refresh:" + JSON.toJSONString(newToken));
session.setAttribute(OAUTH_TOKEN_SESSION, newToken);
} catch (OAuthApiException e) {
throw e;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment