com.payneteasy.superfly.security.processor.CompoundLatestAuthUnwrappingPostProcessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of superfly-spring-security Show documentation
Show all versions of superfly-spring-security Show documentation
Module for Spring Security which enables application to use Superfly authentication/authorization declaratively through Spring Security
package com.payneteasy.superfly.security.processor;
import org.springframework.security.core.Authentication;
import com.payneteasy.superfly.security.authentication.CompoundAuthentication;
/**
* Post-processor which replaces a {@link CompoundAuthentication} with its
* latest ready {@link Authentication}.
*
* @author Roman Puchkovskiy
*/
public class CompoundLatestAuthUnwrappingPostProcessor implements
AuthenticationPostProcessor {
public Authentication postProcess(Authentication auth) {
CompoundAuthentication compound = (CompoundAuthentication) auth;
return compound.getLatestReadyAuthentication();
}
}