fr.paris.lutece.portal.service.security
Interface LuteceAuthentication


public interface LuteceAuthentication

This Interface defines all methods required by an authentication service password is not valid

Since:
Lutece v1.1
Version:
1.1
Author:
Mairie de Paris

Method Summary
 java.lang.String getAccessControledTemplate()
          Returns the template that contains the Access Controled message.
 java.lang.String getAccessDeniedTemplate()
          Returns the template that contains the Access Denied message.
 LuteceUser getAnonymousUser()
          This method create an anonymous user
 java.lang.String getAuthServiceName()
          Gets the Authentification service name
 java.lang.String getAuthType(javax.servlet.http.HttpServletRequest request)
          Gets the Authentification type
 java.lang.String getDoLoginUrl()
          Returns the DoLogin URL of the Authentication Service
 java.lang.String getDoLogoutUrl()
          Returns the DoLogout URL of the Authentication Service
 LuteceUser getHttpAuthenticatedUser(javax.servlet.http.HttpServletRequest request)
          Returns a Lutece user object if the user is already authenticated in the Http request.
 java.lang.String getLoginPageUrl()
          Returns the Login page URL of the Authentication Service
 java.lang.String getLostPasswordPageUrl()
          Returns the lost password URL of the Authentication Service
 java.lang.String getNewAccountPageUrl()
          Returns the new account page URL of the Authentication Service
 java.lang.String getViewAccountPageUrl()
          Returns the view account page URL of the Authentication Service
 boolean isExternalAuthentication()
          Indicates that the user should be already authenticated by an external authentication service (ex : Web Server authentication).
 boolean isUserInRole(LuteceUser user, javax.servlet.http.HttpServletRequest request, java.lang.String strRole)
          Checks that the current user is associated to a given role
 LuteceUser login(java.lang.String strUserName, java.lang.String strUserPassword, javax.servlet.http.HttpServletRequest request)
          Checks the login
 void logout(LuteceUser user)
          logout the user
 

Method Detail

getAuthServiceName

java.lang.String getAuthServiceName()
Gets the Authentification service name

Returns:
The Service Name

getAuthType

java.lang.String getAuthType(javax.servlet.http.HttpServletRequest request)
Gets the Authentification type

Parameters:
request - The HTTP request
Returns:
The type of authentication

login

LuteceUser login(java.lang.String strUserName,
                 java.lang.String strUserPassword,
                 javax.servlet.http.HttpServletRequest request)
                 throws javax.security.auth.login.LoginException
Checks the login

Parameters:
strUserName - The username
strUserPassword - The user's passord
request - The HttpServletRequest
Returns:
The login
Throws:
javax.security.auth.login.LoginException - The Login Exception

logout

void logout(LuteceUser user)
logout the user

Parameters:
user - The user

getAnonymousUser

LuteceUser getAnonymousUser()
This method create an anonymous user

Returns:
A LuteceUser object corresponding to an anonymous user

isUserInRole

boolean isUserInRole(LuteceUser user,
                     javax.servlet.http.HttpServletRequest request,
                     java.lang.String strRole)
Checks that the current user is associated to a given role

Parameters:
user - The user
request - The HTTP request
strRole - The role name
Returns:
Returns true if the user is associated to the role, otherwise false

isExternalAuthentication

boolean isExternalAuthentication()
Indicates that the user should be already authenticated by an external authentication service (ex : Web Server authentication).

Returns:
true if the authentication is external, false if the authentication is provided by the Lutece portal.

getHttpAuthenticatedUser

LuteceUser getHttpAuthenticatedUser(javax.servlet.http.HttpServletRequest request)
Returns a Lutece user object if the user is already authenticated in the Http request. This method should return null if the user is not authenticated or if the authentication service is not based on Http authentication.

Parameters:
request - The HTTP request
Returns:
Returns A Lutece User

getLoginPageUrl

java.lang.String getLoginPageUrl()
Returns the Login page URL of the Authentication Service

Returns:
The URL

getDoLoginUrl

java.lang.String getDoLoginUrl()
Returns the DoLogin URL of the Authentication Service

Returns:
The URL

getDoLogoutUrl

java.lang.String getDoLogoutUrl()
Returns the DoLogout URL of the Authentication Service

Returns:
The URL

getNewAccountPageUrl

java.lang.String getNewAccountPageUrl()
Returns the new account page URL of the Authentication Service

Returns:
The URL

getViewAccountPageUrl

java.lang.String getViewAccountPageUrl()
Returns the view account page URL of the Authentication Service

Returns:
The URL

getLostPasswordPageUrl

java.lang.String getLostPasswordPageUrl()
Returns the lost password URL of the Authentication Service

Returns:
The URL

getAccessDeniedTemplate

java.lang.String getAccessDeniedTemplate()
Returns the template that contains the Access Denied message.

Returns:
The template path

getAccessControledTemplate

java.lang.String getAccessControledTemplate()
Returns the template that contains the Access Controled message.

Returns:
The template path


Copyright © 2007 Mairie de Paris. All Rights Reserved.