Commit 73931906 authored by Quxl's avatar Quxl

x

parent 7e598fcc
...@@ -50,13 +50,8 @@ public interface OAuthApi { ...@@ -50,13 +50,8 @@ public interface OAuthApi {
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();
OAuthToken tokenObj = new OAuthToken(); OAuthToken token = new OAuthToken(accessToken, refreshToken, idToken, tokenType, expiresIn);
tokenObj.setAccessToken(accessToken); return token;
tokenObj.setRefreshToken(refreshToken);
tokenObj.setIdToken(idToken);
tokenObj.setTokenType(tokenType);
tokenObj.setExpiresIn(expiresIn);
return tokenObj;
} }
} }
package com.egolm.sso.api; package com.egolm.sso.api;
public class OAuthConfig { import java.io.Serializable;
public class OAuthConfig implements Serializable{
private static final long serialVersionUID = 1874417633433974015L;
private String clientId; private String clientId;
private String clientSecret; private String clientSecret;
private String clientScope; private String clientScope;
......
package com.egolm.sso.api; package com.egolm.sso.api;
public class OAuthToken { import java.io.Serializable;
public class OAuthToken implements Serializable {
private static final long serialVersionUID = -73234152183180980L;
private String accessToken; private String accessToken;
private String refreshToken; private String refreshToken;
private String idToken; private String idToken;
private String tokenType; private String tokenType;
private Long expiresIn; private Long expiresIn;
public OAuthToken(String accessToken, String refreshToken, String idToken, String tokenType, Long expiresIn) {
this.accessToken = accessToken;
this.refreshToken = refreshToken;
this.idToken = idToken;
this.tokenType = tokenType;
this.expiresIn = expiresIn;
}
public String getAccessToken() { public String getAccessToken() {
return accessToken; return accessToken;
} }
public void setAccessToken(String accessToken) {
this.accessToken = accessToken;
}
public String getRefreshToken() { public String getRefreshToken() {
return refreshToken; return refreshToken;
} }
public void setRefreshToken(String refreshToken) {
this.refreshToken = refreshToken;
}
public String getIdToken() { public String getIdToken() {
return idToken; return idToken;
} }
public void setIdToken(String idToken) {
this.idToken = idToken;
}
public String getTokenType() { public String getTokenType() {
return tokenType; return tokenType;
} }
public void setTokenType(String tokenType) {
this.tokenType = tokenType;
}
public Long getExpiresIn() { public Long getExpiresIn() {
return expiresIn; return expiresIn;
} }
public void setExpiresIn(Long expiresIn) {
this.expiresIn = expiresIn;
}
} }
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