org.fcrepo.auth.common.PrincipalProvider Maven / Gradle / Ivy
/*
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree.
*/
package org.fcrepo.auth.common;
import javax.servlet.Filter;
import javax.servlet.http.HttpServletRequest;
import java.security.Principal;
import java.util.Set;
/**
* This interface provides a way for authentication code to communicate generic
* credentials to authorization delegates. An implementation of this interface
* could perform a query to determine group membership, for example.
*
* The ServletContainerAuthenticationProvider's principalProviders set may be
* configured with zero or more instances of implementations of this interface,
* which it will consult during authentication. The union of the results will be
* assigned to the FEDORA_ALL_PRINCIPALS session attribute.
*
*
* @author Gregory Jansen
* @see HttpHeaderPrincipalProvider
*/
public interface PrincipalProvider extends Filter {
/**
* Extract principals from the provided HttpServletRequest.
*
* If no principals can be extracted, implementations of this method
* should return the empty set rather than null.
*
*
* @param request the request
* @return a set of security principals
*/
Set getPrincipals(HttpServletRequest request);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy