All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bcgdv.jwt.models.BaseJwtToken Maven / Gradle / Ivy

There is a newer version: 1.1
Show newest version
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