diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-01 15:10:30 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-01 15:10:30 +1300 |
commit | 77b9194cc963645fc9ccf7ce79280982cead8f0f (patch) | |
tree | f85b038a5b40ecbe334bd7864656af7c59204866 /src/org/traccar/api/UserPrincipal.java | |
parent | 0e5e61fd14486e6b926b83895eedf9c97c2cb342 (diff) | |
download | trackermap-server-77b9194cc963645fc9ccf7ce79280982cead8f0f.tar.gz trackermap-server-77b9194cc963645fc9ccf7ce79280982cead8f0f.tar.bz2 trackermap-server-77b9194cc963645fc9ccf7ce79280982cead8f0f.zip |
Refactor security request filtering
Diffstat (limited to 'src/org/traccar/api/UserPrincipal.java')
-rw-r--r-- | src/org/traccar/api/UserPrincipal.java | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/src/org/traccar/api/UserPrincipal.java b/src/org/traccar/api/UserPrincipal.java index 11a6de629..d858b6f47 100644 --- a/src/org/traccar/api/UserPrincipal.java +++ b/src/org/traccar/api/UserPrincipal.java @@ -16,44 +16,24 @@ package org.traccar.api; import java.security.Principal; -import java.util.Set; public class UserPrincipal implements Principal { - private Long id; - private String username; - private String password; - private Set<String> roles; + private String name; + private long userId; - public UserPrincipal(String username, String password, Set<String> roles) { - this.username = username; - this.password = password; - this.roles = roles; + public UserPrincipal(long userId, String name) { + this.userId = userId; + this.name = name; } - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; + public Long getUserId() { + return userId; } @Override public String getName() { - return username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public Set<String> getRoles() { - return roles; + return name; } } |