com.lakhi.employee.api.Session.java Source code

Java tutorial

Introduction

Here is the source code for com.lakhi.employee.api.Session.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.lakhi.employee.api;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.UUID;

/**
 *
 * @author matrixm
 */
public class Session {

    @JsonProperty
    private String email;

    @JsonProperty
    private String accessToken;

    public Session(String email) {
        this.email = email;
        this.accessToken = UUID.randomUUID().toString();
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

}