commit | author | age
|
9ee357
|
1 |
/* |
U |
2 |
jwtTest - JSON Web Token Testimplementierung |
|
3 |
Copyright (C) 2021 Ulrich Hilger |
|
4 |
|
|
5 |
This program is free software: you can redistribute it and/or modify |
|
6 |
it under the terms of the GNU Affero General Public License as |
|
7 |
published by the Free Software Foundation, either version 3 of the |
|
8 |
License, or (at your option) any later version. |
|
9 |
|
|
10 |
This program is distributed in the hope that it will be useful, |
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
GNU Affero General Public License for more details. |
|
14 |
|
|
15 |
You should have received a copy of the GNU Affero General Public License |
|
16 |
along with this program. If not, see <https://www.gnu.org/licenses/>. |
|
17 |
*/ |
|
18 |
package de.uhilger.httpserver.auth.session; |
|
19 |
|
|
20 |
import java.util.Date; |
|
21 |
|
|
22 |
/** |
|
23 |
* |
|
24 |
* @author Ulrich Hilger |
|
25 |
* @version 1, 29.05.2021 |
|
26 |
*/ |
|
27 |
public class LoginSession implements Session { |
|
28 |
|
|
29 |
private String sessionId; |
|
30 |
private Date exp; |
|
31 |
private Object data; |
|
32 |
|
|
33 |
public String getId() { |
|
34 |
return sessionId; |
|
35 |
} |
|
36 |
|
|
37 |
public void setId(String sessionId) { |
|
38 |
this.sessionId = sessionId; |
|
39 |
} |
|
40 |
|
|
41 |
public String getUri() { |
|
42 |
if(data instanceof String) { |
|
43 |
return (String) data; |
|
44 |
} else { |
|
45 |
return null; |
|
46 |
} |
|
47 |
} |
|
48 |
|
|
49 |
public void setUri(String uri) { |
|
50 |
this.data = uri; |
|
51 |
} |
|
52 |
|
|
53 |
public Date getExp() { |
|
54 |
return exp; |
|
55 |
} |
|
56 |
|
|
57 |
public void setExp(Date exp) { |
|
58 |
this.exp = exp; |
|
59 |
} |
|
60 |
|
|
61 |
@Override |
|
62 |
public Object getData() { |
|
63 |
return data; |
|
64 |
} |
|
65 |
|
|
66 |
@Override |
|
67 |
public void setData(Object data) { |
|
68 |
this.data = data; |
|
69 |
} |
|
70 |
|
|
71 |
|
|
72 |
|
|
73 |
} |