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

com.undefinedlabs.scope.deps.okhttp3.Challenge Maven / Gradle / Ivy

Go to download

Scope is a APM for tests to give engineering teams unprecedented visibility into their CI process to quickly identify, troubleshoot and fix failed builds. This artifact contains dependencies for Scope.

There is a newer version: 0.14.0-beta.2
Show newest version
package com.undefinedlabs.scope.deps.okhttp3;

public final class Challenge {
    private final String scheme;
    private final String realm;

    public Challenge(String scheme, String realm) {
        if (scheme == null) throw new NullPointerException("scheme == null");
        if (realm == null) throw new NullPointerException("realm == null");
        this.scheme = scheme;
        this.realm = realm;
    }

    /** Returns the authentication scheme, like {@code Basic}. */
    public String scheme() {
        return scheme;
    }

    /** Returns the protection space. */
    public String realm() {
        return realm;
    }

    @Override public boolean equals(Object other) {
        return other instanceof Challenge
                && ((Challenge) other).scheme.equals(scheme)
                && ((Challenge) other).realm.equals(realm);
    }

    @Override public int hashCode() {
        int result = 29;
        result = 31 * result + realm.hashCode();
        result = 31 * result + scheme.hashCode();
        return result;
    }

    @Override public String toString() {
        return scheme + " realm=\"" + realm + "\"";
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy