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

com.smartbear.readyapi.client.auth.NTLMAuthenticationBuilder Maven / Gradle / Ivy

Go to download

Java client library for creating and executing test recipes against Ready!API TestServer

The newest version!
package com.smartbear.readyapi.client.auth;

import com.smartbear.readyapi.client.model.Authentication;

import static com.smartbear.readyapi.client.Validator.validateNotEmpty;

public class NTLMAuthenticationBuilder extends BasicAuthenticationBuilder {

    public NTLMAuthenticationBuilder(String username, String password) {
        super(username, password);
    }

    public NTLMAuthenticationBuilder setDomain(String domain) {
        authentication.setDomain(domain);
        return this;
    }

    @Override
    public Authentication build() {
        validateNotEmpty(authentication.getUsername(), "Missing username, it's a required parameter for NTLM Auth.");
        validateNotEmpty(authentication.getPassword(), "Missing password, it's a required parameter for NTLM Auth.");
        authentication.setType("NTLM");
        return authentication;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy