diff options
Diffstat (limited to 'src/org/traccar/api/resource')
-rw-r--r-- | src/org/traccar/api/resource/ServerResource.java | 2 | ||||
-rw-r--r-- | src/org/traccar/api/resource/SessionResource.java | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/org/traccar/api/resource/ServerResource.java b/src/org/traccar/api/resource/ServerResource.java index fc04ee248..ffe6745f4 100644 --- a/src/org/traccar/api/resource/ServerResource.java +++ b/src/org/traccar/api/resource/ServerResource.java @@ -20,6 +20,7 @@ import org.traccar.api.BaseResource; import org.traccar.model.Server; import org.traccar.model.User; +import javax.annotation.security.PermitAll; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.Consumes; import javax.ws.rs.FormParam; @@ -37,6 +38,7 @@ import java.sql.SQLException; @Consumes(MediaType.APPLICATION_JSON) public class ServerResource extends BaseResource { + @PermitAll @GET public Server get() { try { 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 { |