public class TokenEntity extends Object implements Token
| 构造器和说明 |
|---|
TokenEntity() |
| 限定符和类型 | 方法和说明 |
|---|---|
static TokenEntity |
create(User owner) |
static TokenEntity |
create(User owner,
long timeout) |
void |
disable()
disable the token but not revoke the token (when the user access the
protected resource with the disabled token , it will tell user the token
is disabled, in another words, the user is kicked off )
|
Date |
getExpiredDate() |
Date |
getLatestTime() |
User |
getOwner() |
String |
getToken() |
boolean |
isEnabled() |
void |
setEnabled(boolean enabled) |
void |
setExpiredDate(Date expiredDate) |
void |
setLatestTime(Date latestTime) |
void |
setOwner(User owner) |
void |
setToken(String token) |
void |
updateExpiredDate(long timeout) |
public static TokenEntity create(User owner)
public static TokenEntity create(User owner, long timeout)
public void setToken(String token)
public void setOwner(User owner)
public Date getExpiredDate()
getExpiredDate 在接口中 Tokenpublic void setExpiredDate(Date expiredDate)
public Date getLatestTime()
getLatestTime 在接口中 Tokenpublic void setLatestTime(Date latestTime)
public boolean isEnabled()
public void setEnabled(boolean enabled)
public void updateExpiredDate(long timeout)
updateExpiredDate 在接口中 Tokentimeout - update the expired time if user accessed the protected
resource , always add the max live duration based on current
timestampCopyright © 2016. All rights reserved.