Example usage for org.springframework.security.access.expression SecurityExpressionOperations isFullyAuthenticated

List of usage examples for org.springframework.security.access.expression SecurityExpressionOperations isFullyAuthenticated

Introduction

In this page you can find the example usage for org.springframework.security.access.expression SecurityExpressionOperations isFullyAuthenticated.

Prototype

boolean isFullyAuthenticated();

Source Link

Document

Determines if the #getAuthentication() authenticated without the use of remember me

Usage

From source file:de.iew.framework.security.access.WebResourceAccessEvaluator.java

/**
 * Evaluate the {@link FlagConfigAttribute} instance.
 *
 * @param authentication      the authentication
 * @param filterInvocation    the filter invocation
 * @param flagConfigAttribute the flag config attribute
 * @return the boolean//from   www . j a v  a2  s  .  c om
 */
public boolean evaluate(Authentication authentication, FilterInvocation filterInvocation,
        FlagConfigAttribute flagConfigAttribute) {
    SecurityExpressionOperations ops = createSecurityExpressionRoot(authentication, filterInvocation);
    if (flagConfigAttribute.isAnonymous()) {
        return ops.isAnonymous();
    } else if (flagConfigAttribute.isPermitAll()) {
        return ops.permitAll();
    } else if (flagConfigAttribute.isDenyAll()) {
        return ops.denyAll();
    } else if (flagConfigAttribute.isRememberMe()) {
        return ops.isRememberMe();
    } else if (flagConfigAttribute.isAuthenticated()) {
        return ops.isAuthenticated();
    } else if (flagConfigAttribute.isFullyAuthenticated()) {
        return ops.isFullyAuthenticated();
    }
    throw new IllegalArgumentException("Illegal flag config attribute: All flags are false");
}