Class PsAll

  • All Implemented Interfaces:
    Pass

    public final class PsAll
    extends Object
    implements Pass
    A Pass which you can enter only if you can enter every Pass in a list.
    Since:
    0.22
    • Constructor Detail

      • PsAll

        public PsAll​(List<? extends Pass> passes,
                     int identity)
        Ctor.
        Parameters:
        passes - All Passes to be checked.
        identity - Index of a Pass whose Identity to return on successful enter(Request)
    • Method Detail

      • enter

        public Opt<Identity> enter​(Request request)
                            throws Exception
        Description copied from interface: Pass
        Authenticate the user by the request.
        Specified by:
        enter in interface Pass
        Parameters:
        request - The request
        Returns:
        Identity of the user found
        Throws:
        Exception - If fails
      • exit

        public Response exit​(Response response,
                             Identity identity)
                      throws Exception
        Description copied from interface: Pass
        Wrap the response with the user.
        Specified by:
        exit in interface Pass
        Parameters:
        response - Response
        identity - Identity
        Returns:
        New response
        Throws:
        Exception - If fails