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

com.payneteasy.superfly.security.DelegatingDecisionManager Maven / Gradle / Ivy

Go to download

Module for Spring Security which enables application to use Superfly authentication/authorization declaratively through Spring Security

There is a newer version: 1.7-32
Show newest version
package com.payneteasy.superfly.security;

import com.payneteasy.superfly.security.exception.InsufficientAuthenticationException;
import org.springframework.security.access.AccessDecisionManager;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.core.Authentication;

import java.util.Collection;

public class DelegatingDecisionManager implements AccessDecisionManager {

    private AccessDecisionManager delegate;

    public DelegatingDecisionManager() {
    }

    public DelegatingDecisionManager(AccessDecisionManager delegate) {
        this.delegate = delegate;
    }

    public void setDelegate(AccessDecisionManager delegate) {
        this.delegate = delegate;
    }

    protected AccessDecisionManager getDelegate() {
        return delegate;
    }

    public void decide(Authentication authentication, Object object,
            Collection configAttributes)
            throws AccessDeniedException, InsufficientAuthenticationException {
        delegate.decide(authentication, object, configAttributes);
    }

    public boolean supports(ConfigAttribute attribute) {
        return delegate.supports(attribute);
    }

    public boolean supports(Class clazz) {
        return delegate.supports(clazz);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy