diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-02 12:09:47 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-02 12:09:47 +1300 |
commit | 84d2b260896e336482c302cf2a52a79c013ee13e (patch) | |
tree | 91483f406f5d90b6b06034b5e704f4cce4c00514 /src/org/traccar/api/resource/SessionResource.java | |
parent | a0c9cec5beb28448073b127c31df23134336f4cf (diff) | |
download | trackermap-server-84d2b260896e336482c302cf2a52a79c013ee13e.tar.gz trackermap-server-84d2b260896e336482c302cf2a52a79c013ee13e.tar.bz2 trackermap-server-84d2b260896e336482c302cf2a52a79c013ee13e.zip |
Use annotations for resource access control
Diffstat (limited to 'src/org/traccar/api/resource/SessionResource.java')
-rw-r--r-- | src/org/traccar/api/resource/SessionResource.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/org/traccar/api/resource/SessionResource.java b/src/org/traccar/api/resource/SessionResource.java index 347beb9a3..53e29802c 100644 --- a/src/org/traccar/api/resource/SessionResource.java +++ b/src/org/traccar/api/resource/SessionResource.java @@ -19,6 +19,7 @@ import org.traccar.Context; import org.traccar.api.BaseResource; import org.traccar.model.User; +import javax.annotation.security.PermitAll; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; @@ -43,6 +44,7 @@ public class SessionResource extends BaseResource { @javax.ws.rs.core.Context private HttpServletRequest req; + @PermitAll @GET public User get() { try { @@ -57,6 +59,7 @@ public class SessionResource extends BaseResource { } } + @PermitAll @POST public User add(@FormParam("email") String email, @FormParam("password") String password) { try { |