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 java.util.Collection;

import org.springframework.security.access.AccessDecisionManager;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.authentication.InsufficientAuthenticationException;
import org.springframework.security.core.Authentication;

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 - 2025 Weber Informatics LLC | Privacy Policy