Class PsFake

  • All Implemented Interfaces:
    Pass

    public final class PsFake
    extends Object
    implements Pass
    Fake pass.

    The class is immutable and thread-safe.

    Since:
    0.9
    • Constructor Detail

      • PsFake

        public PsFake​(boolean cond)
        Ctor.
        Parameters:
        cond - Condition
    • Method Detail

      • enter

        public Opt<Identity> enter​(Request request)
        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
      • exit

        public Response exit​(Response response,
                             Identity identity)
        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