net.sf.jguard.jee.authentication.http
Class JEERequestWrapperUtil

java.lang.Object
  extended by net.sf.jguard.jee.authentication.http.JEERequestWrapperUtil

public class JEERequestWrapperUtil
extends Object

utility class for JEE wrappers like HttpServletRequestWrapper or JGuardPortletRequestWrapper.

Author:
Charles Gay

Constructor Summary
JEERequestWrapperUtil()
           
 
Method Summary
static String getRemoteUser(LoginContextWrapper loginContextWrapper, AuthenticationManager authManager)
          return the 'identity' credential value converted to a String.
static Principal getUserPrincipal(LoginContextWrapper authUtils)
          return a UserPrincipal which embeds a Subject.
static boolean isUserInRole(String applicationName, String role, LoginContextWrapper loginContextWrapper)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JEERequestWrapperUtil

public JEERequestWrapperUtil()
Method Detail

getRemoteUser

public static String getRemoteUser(LoginContextWrapper loginContextWrapper,
                                   AuthenticationManager authManager)
return the 'identity' credential value converted to a String. note that only one credential must be an identity credential.

Parameters:
loginContextWrapper -
authManager -
Returns:

isUserInRole

public static boolean isUserInRole(String applicationName,
                                   String role,
                                   LoginContextWrapper loginContextWrapper)

getUserPrincipal

public static Principal getUserPrincipal(LoginContextWrapper authUtils)
return a UserPrincipal which embeds a Subject.

Parameters:
authUtils -
Returns:


Copyright © 2004-2011. All Rights Reserved.