Class SamlStatus

java.lang.Object
se.swedenconnect.signservice.authn.saml.SamlStatus

public class SamlStatus extends Object
A utility class for working with SAML Status objects.
  • Field Details

    • CANCEL_STATUS_CODE

      public static final String CANCEL_STATUS_CODE
      The status code for cancel (defined by the Swedish eID framework).
      See Also:
    • FRAUD_STATUS_CODE

      public static final String FRAUD_STATUS_CODE
      Status code for fraud detection.
      See Also:
    • POSSIBLE_FRAUD_STATUS_CODE

      public static final String POSSIBLE_FRAUD_STATUS_CODE
      Status code for possible fraud detection.
      See Also:
  • Constructor Details

    • SamlStatus

      public SamlStatus(@Nonnull org.opensaml.saml.saml2.core.Status status)
      Constructor.
      Parameters:
      status - the status object
  • Method Details

    • getMainStatusCode

      @Nullable public String getMainStatusCode()
      Gets the main status code.
      Returns:
      the main status code
    • getMinorStatusCode

      @Nullable public String getMinorStatusCode()
      Gets the minor status code.
      Returns:
      the minor status code
    • getStatusMessage

      @Nullable public String getStatusMessage()
      Gets the status message.
      Returns:
      the status message
    • getStatusMessage

      @Nonnull public String getStatusMessage(String defaultMessage)
      Gets the status message, and if no such message exists, returns the supplied defaultMessage
      Parameters:
      defaultMessage - the default message
      Returns:
      the status message (or the default message if no message is available)
    • isCancel

      public boolean isCancel()
      Predicate telling whether this status object represents a cancelled operation.
      Returns:
      true if the status represents a cancelled operation and false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object