Package org.apache.jetspeed.security

Examples of org.apache.jetspeed.security.AuthenticationProvider


        this.defaultAuthenticationProvider = defaultAuthenticationProvider;
    }
   
    protected AuthenticationProvider getAuthenticationProviderByName(String providerName)
    {
        AuthenticationProvider provider = null;
       
        for (int i = 0; i < authenticationProviders.size(); i++)
        {
            provider = (AuthenticationProvider) authenticationProviders.get(i);
            if (providerName.equals(provider.getProviderName()))
            {
                break;
            }
            else
            {
View Full Code Here


    /**
     * @see org.apache.jetspeed.security.AuthenticationProviderProxy#getAuthenticationProvider(java.lang.String)
     */
    public String getAuthenticationProvider(String userName)
    {
        AuthenticationProvider authenticationProvider;
        String providerName = null;
       
        for (int i = 0; i < authenticationProviders.size(); i++)
        {
            authenticationProvider = (AuthenticationProvider)authenticationProviders.get(i);
            if (authenticationProvider.getUserSecurityHandler().isUserPrincipal(userName))
            {
                providerName = authenticationProvider.getProviderName();
                break;
            }
        }
        return providerName;
    }   
View Full Code Here

     * @see org.apache.jetspeed.security.AuthenticationProviderProxy#addUserPrincipal(org.apache.jetspeed.security.UserPrincipal,
     *      java.lang.String)
     */
    public void addUserPrincipal(UserPrincipal userPrincipal, String authenticationProvider) throws SecurityException
    {
        AuthenticationProvider provider = getAuthenticationProviderByName(authenticationProvider);
        if ( provider != null )
        {
            provider.getUserSecurityHandler().updateUserPrincipal(userPrincipal);
        }
        else
        {
            throw new SecurityException(SecurityException.INVALID_AUTHENTICATION_PROVIDER.create(authenticationProvider));
        }
View Full Code Here

     * @see org.apache.jetspeed.security.AuthenticationProviderProxy#updateUserPrincipal(org.apache.jetspeed.security.UserPrincipal,
     *      java.lang.String)
     */
    public void updateUserPrincipal(UserPrincipal userPrincipal, String authenticationProvider) throws SecurityException
    {
        AuthenticationProvider provider = getAuthenticationProviderByName(authenticationProvider);
        if ( provider != null )
        {
            provider.getUserSecurityHandler().updateUserPrincipal(userPrincipal);
        }
        else
        {
            throw new SecurityException(SecurityException.INVALID_AUTHENTICATION_PROVIDER.create(authenticationProvider));
        }
View Full Code Here

     * @see org.apache.jetspeed.security.AuthenticationProviderProxy#removeUserPrincipal(org.apache.jetspeed.security.UserPrincipal,
     *      java.lang.String)
     */
    public void removeUserPrincipal(UserPrincipal userPrincipal, String authenticationProvider) throws SecurityException
    {
        AuthenticationProvider provider = getAuthenticationProviderByName(authenticationProvider);
        if ( provider != null )
        {
            provider.getUserSecurityHandler().removeUserPrincipal(userPrincipal);
        }
        else
        {
            throw new SecurityException(SecurityException.INVALID_AUTHENTICATION_PROVIDER.create(authenticationProvider));
        }
View Full Code Here

    {
        Set publicCredentials = new HashSet();
        String providerName = getAuthenticationProvider(username);
        if ( providerName != null )
        {
            AuthenticationProvider provider = getAuthenticationProviderByName(providerName);
            publicCredentials.addAll(provider.getCredentialHandler().getPublicCredentials(username));
        }
        return publicCredentials;
    }
View Full Code Here

     * @see org.apache.jetspeed.security.AuthenticationProviderProxy#setPublicPasswordCredential(org.apache.jetspeed.security.PasswordCredential,
     *      org.apache.jetspeed.security.PasswordCredential, java.lang.String)
     */
    public void setPassword(String userName, String oldPassword, String newPassword, String authenticationProvider) throws SecurityException
    {
        AuthenticationProvider provider = getAuthenticationProviderByName(authenticationProvider);
        if ( provider != null )
        {
            provider.getCredentialHandler().setPassword(userName,oldPassword,newPassword);
        }
        else
        {
            throw new SecurityException(SecurityException.INVALID_AUTHENTICATION_PROVIDER.create(authenticationProvider));
        }
View Full Code Here

    {
        Set privateCredentials = new HashSet();
        String providerName = getAuthenticationProvider(username);
        if ( providerName != null )
        {
            AuthenticationProvider provider = getAuthenticationProviderByName(providerName);
            privateCredentials.addAll(provider.getCredentialHandler().getPrivateCredentials(username));
        }
        return privateCredentials;
    }   
View Full Code Here

     * @see org.apache.jetspeed.security.AuthenticationProviderProxy#setPasswordEnabled(java.lang.String, boolean, java.lang.String)
     */
    public void setPasswordEnabled(String userName, boolean enabled, String authenticationProvider)
            throws SecurityException
    {
        AuthenticationProvider provider = getAuthenticationProviderByName(authenticationProvider);
        if ( provider != null )
        {
            provider.getCredentialHandler().setPasswordEnabled(userName,enabled);
        }
        else
        {
            throw new SecurityException(SecurityException.INVALID_AUTHENTICATION_PROVIDER.create(authenticationProvider));
        }
View Full Code Here

     * @see org.apache.jetspeed.security.AuthenticationProviderProxy#setPasswordUpdateRequired(java.lang.String, boolean, java.lang.String)
     */
    public void setPasswordUpdateRequired(String userName, boolean updateRequired, String authenticationProvider)
            throws SecurityException
    {
        AuthenticationProvider provider = getAuthenticationProviderByName(authenticationProvider);
        if ( provider != null )
        {
            provider.getCredentialHandler().setPasswordUpdateRequired(userName,updateRequired);
        }
        else
        {
            throw new SecurityException(SecurityException.INVALID_AUTHENTICATION_PROVIDER.create(authenticationProvider));
        }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.security.AuthenticationProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.