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

com.itxiaoer.commons.jwt.JwtAuth Maven / Gradle / Ivy

There is a newer version: 2.3.4
Show newest version
package com.itxiaoer.commons.jwt;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @author : liuyk
 */
@Data
@SuppressWarnings({"unused", "WeakerAccess"})
public class JwtAuth implements Serializable {
    private static final long serialVersionUID = -6764469906496100993L;
    private String id;
    private String loginName;
    private String nickName;
    private String avatar;
    @JsonIgnore
    private String token;
    private boolean notExpired;
    private List roles;

    public JwtAuth() {
        this.notExpired = true;
    }


    public JwtAuth(
            String id,
            String loginName,
            String nickName,
            List roles) {
        this.id = id;
        this.loginName = loginName;
        this.nickName = nickName;
        this.roles = roles;
        this.notExpired = true;
    }

    public JwtAuth(
            String id,
            String loginName,
            String nickName,
            String avatar,
            List roles) {
        this.id = id;
        this.loginName = loginName;
        this.nickName = nickName;
        this.roles = roles;
        this.avatar = avatar;
        this.notExpired = true;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy