Java tutorial
/* * 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; } }