Naftali,

What's the use case for being able to programmatically login when you still 
need to provide a HttpRequest? Why can't I just login using my credentials only?

Greetings, Marcel

On 11 Nov 2010, at 16:45 , <subversion at amdatu.org> wrote:

> Author: naftali.vanderloon at luminis.eu
> Date: Thu Nov 11 16:45:50 2010
> New Revision: 409
> 
> Log:
> [AMDATU-166]
> 
> Modified:
>   
> trunk/amdatu-authorization/login-service/src/main/java/org/amdatu/authorization/login/service/LoginService.java
> 
> Modified: 
> trunk/amdatu-authorization/login-service/src/main/java/org/amdatu/authorization/login/service/LoginService.java
> ==============================================================================
> --- 
> trunk/amdatu-authorization/login-service/src/main/java/org/amdatu/authorization/login/service/LoginService.java
>    (original)
> +++ 
> trunk/amdatu-authorization/login-service/src/main/java/org/amdatu/authorization/login/service/LoginService.java
>    Thu Nov 11 16:45:50 2010
> @@ -16,6 +16,9 @@
>  */
> package org.amdatu.authorization.login.service;
> 
> +import javax.ws.rs.core.Response;
> +import javax.servlet.http.HttpServletRequest;
> +
> 
> /**
>  * This interface defines the authorization service.
> @@ -31,4 +34,28 @@
>      * Key under which the password is stored in the credentials of the User.
>      */
>     String PASSWORD_CREDENTIAL_KEY = "password";
> +    
> +    /**
> +     * Shows the login status of the user.
> +     * @param request The current httprequest
> +     * @return Response the username of the current user is logged in or an
> +     * empty string if the user is not logged in.
> +     */
> +    public Response getLoginStatus(HttpServletRequest request);
> +    
> +    /**
> +     * Enables the user login with a username and password.
> +     * @param username The username 
> +     * @param password The plain text password
> +     * @param request The current httprequest
> +     * @return Response The result of the login.
> +     */
> +    public Response login(String username, String password, 
> HttpServletRequest request);
> +
> +    /**
> +     * Enables the user logout.
> +     * @param request The current httprequest
> +     * @return Response The result of the logout.
> +     */
> +     public Response logout(HttpServletRequest request);
> }
> \ No newline at end of file
> _______________________________________________
> Amdatu-commits mailing list
> Amdatu-commits at amdatu.org
> http://lists.amdatu.org/mailman/listinfo/amdatu-commits


Reply via email to