cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/environment Request.java
Date Fri, 06 Jul 2001 14:10:38 GMT
bloritsch    01/07/06 07:10:37

  Modified:    src/org/apache/cocoon/environment Request.java
  Log:
  Expose some methods left out of the Request object.  These are necessary for
  proper Servlet security.
  
  Revision  Changes    Path
  1.2       +35 -1     xml-cocoon2/src/org/apache/cocoon/environment/Request.java
  
  Index: Request.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/environment/Request.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Request.java	2001/05/09 20:49:43	1.1
  +++ Request.java	2001/07/06 14:10:34	1.2
  @@ -12,13 +12,15 @@
   import java.io.UnsupportedEncodingException;
   import java.util.Enumeration;
   import java.util.Locale;
  +import java.security.Principal;
   
   /**
    * Defines an interface to provide client request information .
    *
    * @author <a href="mailto:dims@yahoo.com">Davanum Srinivas</a>
    * @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2001/05/09 20:49:43 $
  + * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  + * @version CVS $Revision: 1.2 $ $Date: 2001/07/06 14:10:34 $
    *
    */
   
  @@ -548,6 +550,38 @@
        */
   
       String getRemoteUser();
  +
  +    /**
  +     *
  +     * Returns the login of the user making this request, if the
  +     * user has been authenticated, or <code>null</code> if the user
  +     * has not been authenticated.
  +     * Whether the user name is sent with each subsequent request
  +     * depends on the browser and type of authentication. Same as the
  +     * value of the CGI variable REMOTE_USER.
  +     *
  +     * @return                a <code>String</code> specifying the login
  +     *                        of the user making this request, or <code>null</code
  +     *                        if the user login is not known
  +     *
  +     */
  +
  +    Principal getUserPrincipal();
  +
  +    /**
  +     *
  +     * Checks whether the currently logged in user is in a specified role.
  +     *
  +     * @return                        <code>true</code> if the user is
  +     *                                authenticated and in the role;
  +     *                                otherwise, <code>false</code>
  +     *
  +     *
  +     * @see                        #getRemoteUser
  +     *
  +     */
  +
  +    boolean isUserInRole(String role);
   
       /**
        *
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message