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

org.acegisecurity.AuthenticationTrustResolver Maven / Gradle / Ivy

There is a newer version: 1.0.7
Show newest version
/* Copyright 2004, 2005 Acegi Technology Pty Limited
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.acegisecurity;

/**
 * Evaluates Authentication tokens
 *
 * @author Ben Alex
 * @version $Id: AuthenticationTrustResolver.java,v 1.2 2005/11/17 00:55:49 benalex Exp $
 */
public interface AuthenticationTrustResolver {
    //~ Methods ================================================================

    /**
     * Indicates whether the passed Authentication token
     * represents an anonymous user. Typically the framework will call this
     * method if it is trying to decide whether an
     * AccessDeniedException should result in a final rejection
     * (ie as would be the case if the principal was non-anonymous/fully
     * authenticated) or direct the principal to attempt actual authentication
     * (ie as would be the case if the Authentication was merely
     * anonymous).
     *
     * @param authentication to test (may be null in which case
     *        the method will always return false)
     *
     * @return true the passed authentication token represented an
     *         anonymous principal, false otherwise
     */
    public boolean isAnonymous(Authentication authentication);

    /**
     * Indicates whether the passed Authentication token
     * represents user that has been remembered (ie not a user that has been
     * fully authenticated).
     * 
     * 

* No part of the framework uses this method, as it is a weak * definition of trust levels. The method is provided simply to assist * with custom AccessDecisionVoters and the like that you * might develop. Of course, you don't need to use this method either and * can develop your own "trust level" hierarchy instead. *

* * @param authentication to test (may be null in which case * the method will always return false) * * @return true the passed authentication token represented a * principal authenticated using a remember-me token, * false otherwise */ public boolean isRememberMe(Authentication authentication); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy