Implement Authentication Filter (2.1.3.3)
This commit is contained in:
+7
-3
@@ -1,5 +1,8 @@
|
||||
package dst.ass2.service.api.auth.rest;
|
||||
|
||||
import javax.ws.rs.FormParam;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
import dst.ass2.service.api.auth.AuthenticationException;
|
||||
@@ -8,11 +11,12 @@ import dst.ass2.service.api.auth.NoSuchUserException;
|
||||
/**
|
||||
* The IAuthenticationResource exposes parts of the {@code IAuthenticationService} as a RESTful interface.
|
||||
*/
|
||||
@Path("auth")
|
||||
public interface IAuthenticationResource {
|
||||
|
||||
// TODO annotate the class and methods with the correct javax.ws.rs annotations
|
||||
|
||||
Response authenticate(String email, String password)
|
||||
@POST
|
||||
@Path("authenticate")
|
||||
Response authenticate(@FormParam("email") String email, @FormParam("password") String password)
|
||||
throws NoSuchUserException, AuthenticationException;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user