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

org.mockserver.authentication.ChainedAuthenticationHandler Maven / Gradle / Ivy

There is a newer version: 5.15.0
Show newest version
package org.mockserver.authentication;

import org.mockserver.model.HttpRequest;

public class ChainedAuthenticationHandler implements AuthenticationHandler {

    private final AuthenticationHandler[] authenticationHandlers;

    public ChainedAuthenticationHandler(AuthenticationHandler... authenticationHandlers) {
        this.authenticationHandlers = authenticationHandlers;
    }

    @Override
    public boolean controlPlaneRequestAuthenticated(HttpRequest request) {
        for (AuthenticationHandler authenticationHandler : authenticationHandlers) {
            if (!authenticationHandler.controlPlaneRequestAuthenticated(request)) {
                return false;
            }
        }
        return true;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy