portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlest...@apache.org
Subject cvs commit: jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security AuthenticationProviderProxy.java
Date Sat, 16 Oct 2004 22:30:31 GMT
dlestrat    2004/10/16 15:30:31

  Modified:    components/security/src/java/org/apache/jetspeed/security/impl
                        UserManagerImpl.java
                        AuthenticationProviderProxyImpl.java
               components/security/src/java/org/apache/jetspeed/security
                        AuthenticationProviderProxy.java
  Log:
  Adding support for creating user in specified authentication provider.
  Also, added comment to permission manager. Clarification.
  
  Revision  Changes    Path
  1.14      +14 -2     jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/impl/UserManagerImpl.java
  
  Index: UserManagerImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/impl/UserManagerImpl.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- UserManagerImpl.java	11 Oct 2004 23:25:29 -0000	1.13
  +++ UserManagerImpl.java	16 Oct 2004 22:30:31 -0000	1.14
  @@ -124,6 +124,18 @@
           ArgUtil.notNull(new Object[] { username, password }, new String[] { "username",
"password" },
                   "addUser(java.lang.String, java.lang.String)");
   
  +        addUser(username, password, atnProviderProxy.getDefaultAuthenticationProvider());
  +    }
  +
  +    /**
  +     * @see org.apache.jetspeed.security.UserManager#addUser(java.lang.String,
  +     *      java.lang.String, java.lang.String)
  +     */
  +    public void addUser(String username, String password, String atnProviderName) throws
SecurityException
  +    {
  +        ArgUtil.notNull(new Object[] { username, password, atnProviderName }, new String[]
{ "username", "password", "atnProviderName"},
  +                "addUser(java.lang.String, java.lang.String, java.lang.String)");
  +
           // Check if user already exists.
           if (userExists(username))
           {
  @@ -146,7 +158,7 @@
                   atnProviderProxy.setUserPrincipal(userPrincipal);
                   // Set security credentials
                   PasswordCredential pwdCredential = new PasswordCredential(username, password.toCharArray());
  -                atnProviderProxy.setPrivatePasswordCredential(null, pwdCredential);
  +                atnProviderProxy.setPrivatePasswordCredential(null, pwdCredential, atnProviderName);
                   if (log.isDebugEnabled())
                   {
                       log.debug("Added user: " + fullPath);
  
  
  
  1.2       +10 -0     jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/impl/AuthenticationProviderProxyImpl.java
  
  Index: AuthenticationProviderProxyImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/impl/AuthenticationProviderProxyImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AuthenticationProviderProxyImpl.java	11 Oct 2004 23:25:29 -0000	1.1
  +++ AuthenticationProviderProxyImpl.java	16 Oct 2004 22:30:31 -0000	1.2
  @@ -68,7 +68,17 @@
               credentialHandlers.add(((AuthenticationProvider) authenticationProviders.get(i)).getCredentialHandler());
           }
       }
  +    
  +    
   
  +    /**
  +     * @see org.apache.jetspeed.security.AuthenticationProviderProxy#getDefaultAuthenticationProvider()
  +     */
  +    public String getDefaultAuthenticationProvider()
  +    {
  +        return this.defaultAuthenticationProvider;
  +    }
  +    
       /**
        * @see org.apache.jetspeed.security.spi.UserSecurityHandler#getUserPrincipal(java.lang.String)
        */
  
  
  
  1.2       +9 -0      jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/AuthenticationProviderProxy.java
  
  Index: AuthenticationProviderProxy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/AuthenticationProviderProxy.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AuthenticationProviderProxy.java	11 Oct 2004 23:25:29 -0000	1.1
  +++ AuthenticationProviderProxy.java	16 Oct 2004 22:30:31 -0000	1.2
  @@ -28,6 +28,15 @@
   {
       /**
        * <p>
  +     * Returns the default authentication provider.
  +     * </p>
  +     * 
  +     * @return The default authentication provider.
  +     */
  +    String getDefaultAuthenticationProvider();
  +    
  +    /**
  +     * <p>
        * Sets user principal in a given authentication provider.
        * </p>
        * 
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message