Interface PrincipalProvider

  • All Superinterfaces:
    javax.servlet.Filter
    All Known Implementing Classes:
    ContainerRolesPrincipalProvider, DelegateHeaderPrincipalProvider, HttpHeaderPrincipalProvider

    public interface PrincipalProvider
    extends javax.servlet.Filter
    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 Also:
    HttpHeaderPrincipalProvider
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Set<Principal> getPrincipals​(javax.servlet.http.HttpServletRequest request)
      Extract principals from the provided HttpServletRequest.
      • Methods inherited from interface javax.servlet.Filter

        destroy, doFilter, init
    • Method Detail

      • getPrincipals

        Set<PrincipalgetPrincipals​(javax.servlet.http.HttpServletRequest request)
        Extract principals from the provided HttpServletRequest.

        If no principals can be extracted, implementations of this method should return the empty set rather than null.

        Parameters:
        request - the request
        Returns:
        a set of security principals