Example usage for org.apache.http.impl.auth NegotiateScheme NegotiateScheme

List of usage examples for org.apache.http.impl.auth NegotiateScheme NegotiateScheme

Introduction

In this page you can find the example usage for org.apache.http.impl.auth NegotiateScheme NegotiateScheme.

Prototype

public NegotiateScheme() 

Source Link

Usage

From source file:org.echocat.jomon.net.http.client.HttpClientAuth.java

@Nonnull
protected AuthScheme parseSchemeOf(@Nonnull Matcher matcher) {
    final String plainAuthScheme = matcher.group(4);
    final AuthScheme authScheme;
    if ("digest".equalsIgnoreCase(plainAuthScheme)) {
        authScheme = new DigestScheme();
    } else if ("negotiate".equalsIgnoreCase(plainAuthScheme)) {
        // noinspection deprecation
        authScheme = new NegotiateScheme();
    } else if ("basic".equalsIgnoreCase(plainAuthScheme) || isEmpty(plainAuthScheme)) {
        authScheme = new BasicScheme();
    } else {/*  ww  w. j  av a 2 s .  c  om*/
        throw new IllegalArgumentException(
                "Unknown authScheme '" + plainAuthScheme + "' of: " + matcher.group());
    }
    return authScheme;
}