/*
 *     Copyright (C) 2015 ASIP Santé
 */
package fr.asipsante.mss.connectkit.paos;

/**
 * Exception signalant une anomalie dans le processus d'authentification SAML2.
 * 
 * @author ASIP Santé
 *
 */
@SuppressWarnings("serial")
// pas de vocation à la sérialisation
public class Saml2ProtocolException extends Exception {
    private String payload;

    public Saml2ProtocolException(String message) {
        super(message);
    }

    public Saml2ProtocolException(String message, String payload) {
        super(message + ":\n" + payload + "\n");
        this.payload = payload;
    }

    public Saml2ProtocolException(String message, Throwable cause) {
        super(message, cause);
    }

    public Saml2ProtocolException(String message, String payload,
            Throwable cause) {
        super(message + ":\n" + payload + "\n", cause);
        this.payload = payload;
    }

    public String getPayload() {
        return payload;
    }
}