
com.bcgdv.jwt.models.BaseJwtToken Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of token-generation Show documentation
Show all versions of token-generation Show documentation
JWT token generation with encrypted payloads and CLI
package com.bcgdv.jwt.models;
import java.io.Serializable;
import java.util.Date;
/**
* Base token class.
*/
public abstract class BaseJwtToken implements Serializable {
/**
* token expires in n ms or -1 for no expiration
*/
protected Long expiryInMilliSeconds;
/**
* date created
*/
protected Long dateCreated = new Date().getTime();
/**
* get expiry time in milliseconds
* @return as Long
*/
public Long getExpiryInMilliSeconds() {
return expiryInMilliSeconds;
}
/**
* set expiry time in milliseconds
* @param expiryInMilliSeconds as Long
*/
public void setExpiryInMilliSeconds(Long expiryInMilliSeconds) {
this.expiryInMilliSeconds = expiryInMilliSeconds;
}
/**
* get date created
* @return date as long system time in ms
*/
public Long getDateCreated() {
return dateCreated;
}
/**
* set the date created
* @param dateCreated the system time in ms
*/
public void setDateCreated(Long dateCreated) {
this.dateCreated = dateCreated;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy