com.riversoft.weixin.mp.oauth2.bean.AccessToken Maven / Gradle / Ivy
package com.riversoft.weixin.mp.oauth2.bean;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Created by exizhai on 12/17/2015.
*/
public class AccessToken {
@JsonProperty("access_token")
private String accessToken;
@JsonProperty("refresh_token")
private String refreshToken;
@JsonProperty("openid")
private String openId;
@JsonProperty("unionid")
private String unionId;
private String scope;
@JsonProperty("expires_in")
private int expiresIn;
private long expiresTill;
public String getAccessToken() {
return accessToken;
}
public void setAccessToken(String accessToken) {
this.accessToken = accessToken;
}
public String getRefreshToken() {
return refreshToken;
}
public void setRefreshToken(String refreshToken) {
this.refreshToken = refreshToken;
}
public String getOpenId() {
return openId;
}
public void setOpenId(String openId) {
this.openId = openId;
}
public String getUnionId() {
return unionId;
}
public void setUnionId(String unionId) {
this.unionId = unionId;
}
public String getScope() {
return scope;
}
public void setScope(String scope) {
this.scope = scope;
}
public int getExpiresIn() {
return expiresIn;
}
public void setExpiresIn(int expiresIn) {
this.expiresIn = expiresIn;
this.expiresTill = System.currentTimeMillis() + (expiresIn * 1000) - 300000;
}
public long getExpiresTill() {
return expiresTill;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy