All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mule.extras.acegi.AcegiAuthenticationAdapter Maven / Gradle / Ivy

/*
 * $Id: AcegiAuthenticationAdapter.java 7976 2007-08-21 14:26:13Z dirk.olmes $
 * --------------------------------------------------------------------------------------
 * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
 *
 * The software in this package is published under the terms of the CPAL v1.0
 * license, a copy of which has been included with this distribution in the
 * LICENSE.txt file.
 */

package org.mule.extras.acegi;

import org.mule.umo.security.UMOAuthentication;

import java.util.Map;

import org.acegisecurity.Authentication;
import org.acegisecurity.GrantedAuthority;

/**
 * AcegiAuthenticationAdapter TODO
 */
public class AcegiAuthenticationAdapter implements UMOAuthentication
{
    private Authentication delegate;
    private Map properties;

    public AcegiAuthenticationAdapter(Authentication authentication)
    {
        this.delegate = authentication;
    }

    public AcegiAuthenticationAdapter(Authentication authentication, Map properties)
    {
        this.delegate = authentication;
        this.properties = properties;
    }

    public void setAuthenticated(boolean b)
    {
        delegate.setAuthenticated(b);
    }

    public boolean isAuthenticated()
    {
        return delegate.isAuthenticated();
    }

    public GrantedAuthority[] getAuthorities()
    {
        return delegate.getAuthorities();
    }

    public Object getCredentials()
    {
        return delegate.getCredentials();
    }

    public Object getDetails()
    {
        return delegate.getDetails();
    }

    public Object getPrincipal()
    {
        return delegate.getPrincipal();
    }

    public int hashCode()
    {
        return delegate.hashCode();
    }

    public boolean equals(Object another)
    {
        return delegate.equals(another);
    }

    public String getName()
    {
        return delegate.getName();
    }

    public Authentication getDelegate()
    {
        return delegate;
    }

    public Map getProperties()
    {
        return properties;
    }

    public void setProperties(Map properties)
    {
        this.properties = properties;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy