/*
 * Decompiled with CFR 0.152.
 */
package org.jivesoftware.smack.sasl;

import java.util.HashMap;
import java.util.Map;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.sasl.packet.SaslStreamElements;

public class SASLErrorException
extends XMPPException {
    private static final long serialVersionUID = 6247573875760717257L;
    private final SaslStreamElements.SASLFailure saslFailure;
    private final String mechanism;
    private final Map<String, String> texts;

    public SASLErrorException(String mechanism, SaslStreamElements.SASLFailure saslFailure) {
        this(mechanism, saslFailure, new HashMap<String, String>());
    }

    public SASLErrorException(String mechanism, SaslStreamElements.SASLFailure saslFailure, Map<String, String> texts) {
        super("SASLError using " + mechanism + ": " + saslFailure.getSASLErrorString());
        this.mechanism = mechanism;
        this.saslFailure = saslFailure;
        this.texts = texts;
    }

    public SaslStreamElements.SASLFailure getSASLFailure() {
        return this.saslFailure;
    }

    public String getMechanism() {
        return this.mechanism;
    }

    public Map<String, String> getTexts() {
        return this.texts;
    }
}
