Package org.apache.jetspeed.security

Examples of org.apache.jetspeed.security.AuthenticationProvider


     * @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

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

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

        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().addUserPrincipal(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

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.