com.flyfish.oauth.entry.scribe.CheckTokenResult Maven / Gradle / Ivy
package com.flyfish.oauth.entry.scribe;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/**
* 检查token 的返回实体
*
* @author wybab
*/
public class CheckTokenResult {
//{"active":true,"exp":1543699594,"user_name":"admin","jti":"055d51bd-ccb0-4a68-9217-1be2e209865b","client_id":"test","scope":["client"]}
private static final CheckTokenResult EMPTY;
static {
EMPTY = new CheckTokenResult();
EMPTY.setActive(false);
}
private boolean active;
private Long exp;
@JsonProperty("user_name")
private String userName;
private String jti;
@JsonProperty("client_id")
private String clientId;
private List scope;
public static CheckTokenResult empty() {
return EMPTY;
}
public boolean isActive() {
return active;
}
public void setActive(boolean active) {
this.active = active;
}
public Long getExp() {
return exp;
}
public void setExp(Long exp) {
this.exp = exp;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getJti() {
return jti;
}
public void setJti(String jti) {
this.jti = jti;
}
public String getClientId() {
return clientId;
}
public void setClientId(String clientId) {
this.clientId = clientId;
}
public List getScope() {
return scope;
}
public void setScope(List scope) {
this.scope = scope;
}
}