Commit 1e72ce36 authored by Quxl's avatar Quxl

x

parent a248c13b
...@@ -32,7 +32,7 @@ public interface OAuth2Api { ...@@ -32,7 +32,7 @@ public interface OAuth2Api {
response.sendRedirect(oauthResponse.getLocationUri()); response.sendRedirect(oauthResponse.getLocationUri());
} }
default AccessToken getToken(HttpServletRequest request) throws OAuthProblemException, OAuthSystemException { default OAuthToken getToken(HttpServletRequest request) throws OAuthProblemException, OAuthSystemException {
OAuthConfig config = this.getOAuthConfig(); OAuthConfig config = this.getOAuthConfig();
OAuthAuthzResponse oauthAuthzResponse = OAuthAuthzResponse.oauthCodeAuthzResponse(request); OAuthAuthzResponse oauthAuthzResponse = OAuthAuthzResponse.oauthCodeAuthzResponse(request);
String code = oauthAuthzResponse.getCode(); String code = oauthAuthzResponse.getCode();
...@@ -50,7 +50,7 @@ public interface OAuth2Api { ...@@ -50,7 +50,7 @@ public interface OAuth2Api {
Long expiresIn = oAuthResponse.getExpiresIn(); Long expiresIn = oAuthResponse.getExpiresIn();
String idToken = oAuthResponse.getParam("id_token"); String idToken = oAuthResponse.getParam("id_token");
String tokenType = oAuthResponse.getTokenType(); String tokenType = oAuthResponse.getTokenType();
AccessToken tokenObj = new AccessToken(); OAuthToken tokenObj = new OAuthToken();
tokenObj.setAccessToken(accessToken); tokenObj.setAccessToken(accessToken);
tokenObj.setRefreshToken(refreshToken); tokenObj.setRefreshToken(refreshToken);
tokenObj.setIdToken(idToken); tokenObj.setIdToken(idToken);
......
package com.egolm.sso.api; package com.egolm.sso.api;
public class AccessToken { public class OAuthToken {
private String accessToken; private String accessToken;
private String refreshToken; private String refreshToken;
......
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