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

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

public class JEERequestWrapperUtil
extends java.lang.Object

utility class for JEE wrappers like HttpServletRequestWrapper or JGuardPortletRequestWrapper.

Author:
Charles Gay

Constructor Summary
JEERequestWrapperUtil()
           
 
Method Summary
static java.lang.String getRemoteUser(net.sf.jguard.core.authentication.AuthenticationUtils authUtils, net.sf.jguard.core.authentication.manager.AuthenticationManager authManager)
          return the 'identity' credential value converted to a String.
static java.security.Principal getUserPrincipal(net.sf.jguard.core.authentication.AuthenticationUtils authUtils)
          return a UserPrincipal which embeds a Subject.
static boolean isUserInRole(java.lang.String applicationName, java.lang.String role, net.sf.jguard.core.authentication.AuthenticationUtils authUtils)
           
 
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 java.lang.String getRemoteUser(net.sf.jguard.core.authentication.AuthenticationUtils authUtils,
                                             net.sf.jguard.core.authentication.manager.AuthenticationManager authManager)
return the 'identity' credential value converted to a String. note that only one credential must be an identity credential.

Parameters:
authUtils -
Returns:

isUserInRole

public static boolean isUserInRole(java.lang.String applicationName,
                                   java.lang.String role,
                                   net.sf.jguard.core.authentication.AuthenticationUtils authUtils)

getUserPrincipal

public static java.security.Principal getUserPrincipal(net.sf.jguard.core.authentication.AuthenticationUtils authUtils)
return a UserPrincipal which embeds a Subject.

Parameters:
authUtils -
Returns:


Copyright © 2004-2009. All Rights Reserved.