134 lines
3.0 KiB
Java
134 lines
3.0 KiB
Java
package org.gcube.common.keycloak.model;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
import org.gcube.com.fasterxml.jackson.annotation.JsonAnyGetter;
|
|
import org.gcube.com.fasterxml.jackson.annotation.JsonAnySetter;
|
|
import org.gcube.com.fasterxml.jackson.annotation.JsonProperty;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
public class TokenResponse implements Serializable {
|
|
|
|
protected static Logger logger = LoggerFactory.getLogger(TokenResponse.class);
|
|
|
|
private static final long serialVersionUID = -7063122428186284827L;
|
|
|
|
@JsonProperty("access_token")
|
|
protected String accessToken;
|
|
|
|
@JsonProperty("expires_in")
|
|
protected long expiresIn;
|
|
|
|
@JsonProperty("refresh_expires_in")
|
|
protected long refreshExpiresIn;
|
|
|
|
@JsonProperty("refresh_token")
|
|
protected String refreshToken;
|
|
|
|
@JsonProperty("token_type")
|
|
protected String tokenType;
|
|
|
|
@JsonProperty("id_token")
|
|
protected String idToken;
|
|
|
|
@JsonProperty("not-before-policy")
|
|
protected int notBeforePolicy;
|
|
|
|
@JsonProperty("session_state")
|
|
protected String sessionState;
|
|
|
|
protected Map<String, Object> otherClaims = new HashMap<>();
|
|
|
|
@JsonProperty("scope")
|
|
protected String scope;
|
|
|
|
public TokenResponse() {
|
|
}
|
|
|
|
public String getScope() {
|
|
return scope;
|
|
}
|
|
|
|
public void setScope(String scope) {
|
|
this.scope = scope;
|
|
}
|
|
|
|
public String getAccessToken() {
|
|
return accessToken;
|
|
}
|
|
|
|
public void setSccessToken(String accessToken) {
|
|
this.accessToken = accessToken;
|
|
}
|
|
|
|
public long getExpiresIn() {
|
|
return expiresIn;
|
|
}
|
|
|
|
public void setExpiresIn(long expiresIn) {
|
|
this.expiresIn = expiresIn;
|
|
}
|
|
|
|
public long getRefreshExpiresIn() {
|
|
return refreshExpiresIn;
|
|
}
|
|
|
|
public void setRefreshExpiresIn(long refreshExpiresIn) {
|
|
this.refreshExpiresIn = refreshExpiresIn;
|
|
}
|
|
|
|
public String getRefreshToken() {
|
|
return refreshToken;
|
|
}
|
|
|
|
public void setRefreshToken(String refreshToken) {
|
|
this.refreshToken = refreshToken;
|
|
}
|
|
|
|
public String getTokenType() {
|
|
return tokenType;
|
|
}
|
|
|
|
public void setTokenType(String tokenType) {
|
|
this.tokenType = tokenType;
|
|
}
|
|
|
|
public String getIdToken() {
|
|
return idToken;
|
|
}
|
|
|
|
public void setIdToken(String idToken) {
|
|
this.idToken = idToken;
|
|
}
|
|
|
|
public int getNotBeforePolicy() {
|
|
return notBeforePolicy;
|
|
}
|
|
|
|
public void setNotBeforePolicy(int notBeforePolicy) {
|
|
this.notBeforePolicy = notBeforePolicy;
|
|
}
|
|
|
|
public String getSessionState() {
|
|
return sessionState;
|
|
}
|
|
|
|
public void setSessionState(String sessionState) {
|
|
this.sessionState = sessionState;
|
|
}
|
|
|
|
@JsonAnyGetter
|
|
public Map<String, Object> getOtherClaims() {
|
|
return otherClaims;
|
|
}
|
|
|
|
@JsonAnySetter
|
|
public void setOtherClaims(String name, Object value) {
|
|
otherClaims.put(name, value);
|
|
}
|
|
|
|
}
|