axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/security/simple SimpleSecurityProvider.java
Date Tue, 11 Sep 2001 17:01:38 GMT
gdaniels    01/09/11 10:01:38

  Modified:    java/src/org/apache/axis/security SecurityProvider.java
               java/src/org/apache/axis/security/simple
                        SimpleSecurityProvider.java
  Log:
  Change SecurityProvider interface to just pass the MessageContext.
  This should help with authentication that uses other info aside from
  username and password strings.
  
  Revision  Changes    Path
  1.3       +4 -8      xml-axis/java/src/org/apache/axis/security/SecurityProvider.java
  
  Index: SecurityProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/security/SecurityProvider.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SecurityProvider.java	2001/07/31 15:11:24	1.2
  +++ SecurityProvider.java	2001/09/11 17:01:38	1.3
  @@ -55,6 +55,8 @@
   
   package org.apache.axis.security;
   
  +import org.apache.axis.MessageContext;
  +
   /** The Axis security provider interface
    * 
    * As Axis is designed for use in embedded environments, those
  @@ -69,16 +71,10 @@
   {
       /** Authenticate a user from a username/password pair.
        * 
  -     * @param username the user name to check
  -     * @param password the password to check
  +     * @param msgContext the MessageContext containing authentication info
        * @return an AuthenticatedUser or null
  -     * 
  -     * NOTE: Since the classes implementing this are going to need to
  -     * be Axis-aware anyway, we might just pass the MessageContext
  -     * here instead, and let the provider authenticate against whatever
  -     * it wants...?
        */
  -    public AuthenticatedUser authenticate(String username, String password);
  +    public AuthenticatedUser authenticate(MessageContext msgContext);
       
       /** See if a user matches a principal name.  The name might be a user
        * or a group.
  
  
  
  1.2       +5 -1      xml-axis/java/src/org/apache/axis/security/simple/SimpleSecurityProvider.java
  
  Index: SimpleSecurityProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/security/simple/SimpleSecurityProvider.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SimpleSecurityProvider.java	2001/09/10 19:51:52	1.1
  +++ SimpleSecurityProvider.java	2001/09/11 17:01:38	1.2
  @@ -57,6 +57,7 @@
   
   import org.apache.axis.security.SecurityProvider;
   import org.apache.axis.security.AuthenticatedUser;
  +import org.apache.axis.MessageContext;
   import org.apache.log4j.Category;
   import org.apache.log4j.Priority;
   
  @@ -118,7 +119,10 @@
        * @param password the password to check
        * @return an AuthenticatedUser or null
        */
  -    public AuthenticatedUser authenticate(String username, String password) {
  +    public AuthenticatedUser authenticate(MessageContext msgContext) {
  +        String username = msgContext.getStrProp(MessageContext.USERID);
  +        String password = msgContext.getStrProp(MessageContext.PASSWORD);
  +
           if (users != null) {
               category.debug( "User: " + username );
   
  
  
  

Mime
View raw message