fr.paris.lutece.plugins.mylutece.modules.cas.authentication
Class CASAuthentication

java.lang.Object
  extended by fr.paris.lutece.plugins.mylutece.authentication.PortalAuthentication
      extended by fr.paris.lutece.plugins.mylutece.modules.cas.authentication.CASAuthentication
All Implemented Interfaces:
fr.paris.lutece.portal.service.security.LuteceAuthentication

public class CASAuthentication
extends fr.paris.lutece.plugins.mylutece.authentication.PortalAuthentication

The class provides an implementation of the inherited abstract class PortalAuthentication based on CAS


Constructor Summary
CASAuthentication()
          Constructor
 
Method Summary
 fr.paris.lutece.portal.service.security.LuteceUser getAnonymousUser()
          This method returns an anonymous Lutece user
 java.lang.String getAuthServiceName()
          Gets the Authentication service name
 java.lang.String getAuthType(javax.servlet.http.HttpServletRequest request)
          Gets the Authentication type
 fr.paris.lutece.portal.service.security.LuteceUser getHttpAuthenticatedUser(javax.servlet.http.HttpServletRequest request)
          Returns a Lutece user object if the user is already authenticated by the WSSO
 java.lang.String getName()
          
 java.lang.String getPluginName()
          
 java.lang.String[] getRolesByUser(fr.paris.lutece.portal.service.security.LuteceUser user)
           
 boolean isExternalAuthentication()
          Returns true
 boolean isUserInRole(fr.paris.lutece.portal.service.security.LuteceUser user, javax.servlet.http.HttpServletRequest request, java.lang.String strRole)
          Checks that the current user is associated to a given role
 fr.paris.lutece.portal.service.security.LuteceUser login(java.lang.String strUserName, java.lang.String strUserPassword, javax.servlet.http.HttpServletRequest request)
           
 void logout(fr.paris.lutece.portal.service.security.LuteceUser user)
          This methods logout the user
 
Methods inherited from class fr.paris.lutece.plugins.mylutece.authentication.PortalAuthentication
getAccessControledTemplate, getAccessDeniedTemplate, getDoLoginUrl, getDoLogoutUrl, getIconUrl, getLoginPageUrl, getLostPasswordPageUrl, getNewAccountPageUrl, getUser, getUsers, getViewAccountPageUrl, isDelegatedAuthentication, isMultiAuthenticationSupported, isUsersListAvailable, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CASAuthentication

public CASAuthentication()
Constructor

Method Detail

getAuthServiceName

public java.lang.String getAuthServiceName()
Gets the Authentication service name

Returns:
The name of the authentication service

getAuthType

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

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

login

public fr.paris.lutece.portal.service.security.LuteceUser login(java.lang.String strUserName,
                                                                java.lang.String strUserPassword,
                                                                javax.servlet.http.HttpServletRequest request)
                                                         throws javax.security.auth.login.LoginException
Throws:
javax.security.auth.login.LoginException

getHttpAuthenticatedUser

public fr.paris.lutece.portal.service.security.LuteceUser getHttpAuthenticatedUser(javax.servlet.http.HttpServletRequest request)
Returns a Lutece user object if the user is already authenticated by the WSSO

Specified by:
getHttpAuthenticatedUser in interface fr.paris.lutece.portal.service.security.LuteceAuthentication
Overrides:
getHttpAuthenticatedUser in class fr.paris.lutece.plugins.mylutece.authentication.PortalAuthentication
Parameters:
request - The HTTP request
Returns:
Returns A Lutece User

logout

public void logout(fr.paris.lutece.portal.service.security.LuteceUser user)
This methods logout the user

Parameters:
user - The user

getRolesByUser

public java.lang.String[] getRolesByUser(fr.paris.lutece.portal.service.security.LuteceUser user)
Specified by:
getRolesByUser in interface fr.paris.lutece.portal.service.security.LuteceAuthentication
Overrides:
getRolesByUser in class fr.paris.lutece.plugins.mylutece.authentication.PortalAuthentication

getAnonymousUser

public fr.paris.lutece.portal.service.security.LuteceUser getAnonymousUser()
This method returns an anonymous Lutece user

Returns:
An anonymous Lutece user

isUserInRole

public boolean isUserInRole(fr.paris.lutece.portal.service.security.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

public boolean isExternalAuthentication()
Returns true

Specified by:
isExternalAuthentication in interface fr.paris.lutece.portal.service.security.LuteceAuthentication
Overrides:
isExternalAuthentication in class fr.paris.lutece.plugins.mylutece.authentication.PortalAuthentication
Returns:
true

getName

public java.lang.String getName()


getPluginName

public java.lang.String getPluginName()



Copyright © 2010 Mairie de Paris. All Rights Reserved.