net.sf.jguard.jsf.authentication
Class JGuardPortletRequestWrapper

java.lang.Object
  extended by net.sf.jguard.jsf.authentication.PortletRequestWrapper
      extended by net.sf.jguard.jsf.authentication.JGuardPortletRequestWrapper
All Implemented Interfaces:
javax.portlet.PortletRequest

public class JGuardPortletRequestWrapper
extends PortletRequestWrapper


Field Summary
 
Fields inherited from class net.sf.jguard.jsf.authentication.PortletRequestWrapper
request
 
Fields inherited from interface javax.portlet.PortletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH, USER_INFO
 
Constructor Summary
JGuardPortletRequestWrapper(javax.portlet.PortletRequest request)
           
 
Method Summary
 java.lang.String getRemoteUser()
           
 java.security.Principal getUserPrincipal()
          return a SubjectAsPrincipal object which wrap the Subject in a Principal.
 boolean isUserInRole(java.lang.String role)
          wrap the isUserInRole method to check against all the RolePrincipal's set of the Subject object.
 
Methods inherited from class net.sf.jguard.jsf.authentication.PortletRequestWrapper
getAttribute, getAttributeNames, getAuthType, getContextPath, getLocale, getLocales, getParameter, getParameterMap, getParameterNames, getParameterValues, getPortalContext, getPortletMode, getPortletSession, getPortletSession, getPreferences, getProperties, getProperty, getPropertyNames, getRequestedSessionId, getResponseContentType, getResponseContentTypes, getScheme, getServerName, getServerPort, getWindowState, isPortletModeAllowed, isRequestedSessionIdValid, isSecure, isWindowStateAllowed, removeAttribute, setAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JGuardPortletRequestWrapper

public JGuardPortletRequestWrapper(javax.portlet.PortletRequest request)
Method Detail

isUserInRole

public boolean isUserInRole(java.lang.String role)
wrap the isUserInRole method to check against all the RolePrincipal's set of the Subject object.

Specified by:
isUserInRole in interface javax.portlet.PortletRequest
Overrides:
isUserInRole in class PortletRequestWrapper
Parameters:
role - : name of the principal(role) we are looking for
Returns:
boolean :return 'true' if one of the principal the Subject owns has got the same name.return 'false' otherwise.

getUserPrincipal

public java.security.Principal getUserPrincipal()
return a SubjectAsPrincipal object which wrap the Subject in a Principal.

Specified by:
getUserPrincipal in interface javax.portlet.PortletRequest
Overrides:
getUserPrincipal in class PortletRequestWrapper
Returns:
principal

getRemoteUser

public java.lang.String getRemoteUser()
Specified by:
getRemoteUser in interface javax.portlet.PortletRequest
Overrides:
getRemoteUser in class PortletRequestWrapper
Returns:
remote user login credential String value


Copyright © 2004-2009. All Rights Reserved.