| | |
| | | /* |
| | | jwtTest - JSON Web Token Testimplementierung |
| | | http-auth - Authentication Extensions to jdk.httpserver |
| | | Copyright (C) 2021 Ulrich Hilger |
| | | |
| | | This program is free software: you can redistribute it and/or modify |
| | |
| | | public class User { |
| | | private String name; |
| | | private String password; |
| | | //private String hash; |
| | | //private List<String> roles; |
| | | |
| | | public User() { |
| | | //this.roles = new ArrayList(); |
| | | } |
| | | |
| | | /* |
| | | public void addRole(String role) { |
| | | roles.add(role); |
| | | } |
| | | |
| | | public void revokeRole(String role) { |
| | | roles.remove(role); |
| | | } |
| | | |
| | | public boolean hasRole(String role) { |
| | | return roles.contains(role); |
| | | } |
| | | */ |
| | | |
| | | public String getName() { |
| | | return name; |
| | |
| | | public void setPassword(String password) { |
| | | this.password = password; |
| | | } |
| | | |
| | | |
| | | /* |
| | | public void setHash(String hash) { |
| | | this.hash = hash; |
| | | } |
| | | |
| | | public String getHash() { |
| | | return hash; |
| | | } |
| | | */ |
| | | |
| | | @Override |
| | | public int hashCode() { |