Package org.apache.wss4j.common.ext
Class WSSecurityException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.apache.xml.security.exceptions.XMLSecurityException
-
- org.apache.wss4j.common.ext.WSSecurityException
-
- All Implemented Interfaces:
Serializable
public class WSSecurityException extends org.apache.xml.security.exceptions.XMLSecurityExceptionException class for WS-Security.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWSSecurityException.ErrorCode
-
Field Summary
Fields Modifier and Type Field Description static QNameFAILED_AUTHENTICATIONThe security token could not be authenticated or authorizedstatic StringFAILED_AUTHENTICATION_ERRstatic QNameFAILED_CHECKThe signature or decryption was invalidstatic StringFAILED_CHECK_ERRstatic QNameINVALID_SECURITYAn error was discovered processing theheader static StringINVALID_SECURITY_ERRstatic QNameINVALID_SECURITY_TOKENAn invalid security token was providedstatic StringINVALID_SECURITY_TOKEN_ERRstatic QNameMESSAGE_EXPIREDThe message has expiredstatic StringMESSAGE_EXPIRED_ERRstatic StringNS_WSSE10Fault codes defined in the WSS 1.1 spec under section 12, Error handlingstatic QNameSECURITY_ERRORGeneric Security errorstatic QNameSECURITY_TOKEN_UNAVAILABLEReferenced security token could not be retrievedstatic StringSECURITY_TOKEN_UNAVAILABLE_ERRstatic StringUNIFIED_SECURITY_ERRstatic QNameUNSUPPORTED_ALGORITHMAn unsupported signature or encryption algorithm was usedstatic StringUNSUPPORTED_ALGORITHM_ERRstatic QNameUNSUPPORTED_SECURITY_TOKENAn unsupported token was providedstatic StringUNSUPPORTED_TOKEN_ERR
-
Constructor Summary
Constructors Constructor Description WSSecurityException(WSSecurityException.ErrorCode errorCode)WSSecurityException(WSSecurityException.ErrorCode errorCode, Exception exception)WSSecurityException(WSSecurityException.ErrorCode errorCode, Exception exception, String msgId)WSSecurityException(WSSecurityException.ErrorCode errorCode, Exception exception, String msgId, Object[] arguments)WSSecurityException(WSSecurityException.ErrorCode errorCode, String msgId)WSSecurityException(WSSecurityException.ErrorCode errorCode, String msgId, Object[] arguments)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WSSecurityException.ErrorCodegetErrorCode()Get the error code.QNamegetFaultCode()Get the fault code QName for this associated error code.StringgetSafeExceptionMessage()Get a "safe" / unified error message, so as not to leak internal configuration to an attacker.QNamegetSafeFaultCode()Get the "safe" / unified fault code QName associated with this exception, so as not to leak internal configuration to an attacker-
Methods inherited from class org.apache.xml.security.exceptions.XMLSecurityException
getMsgID, getOriginalException, printStackTrace, toString
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Field Detail
-
NS_WSSE10
public static final String NS_WSSE10
Fault codes defined in the WSS 1.1 spec under section 12, Error handling- See Also:
- Constant Field Values
-
UNSUPPORTED_SECURITY_TOKEN
public static final QName UNSUPPORTED_SECURITY_TOKEN
An unsupported token was provided
-
UNSUPPORTED_ALGORITHM
public static final QName UNSUPPORTED_ALGORITHM
An unsupported signature or encryption algorithm was used
-
INVALID_SECURITY
public static final QName INVALID_SECURITY
An error was discovered processing theheader
-
INVALID_SECURITY_TOKEN
public static final QName INVALID_SECURITY_TOKEN
An invalid security token was provided
-
FAILED_AUTHENTICATION
public static final QName FAILED_AUTHENTICATION
The security token could not be authenticated or authorized
-
FAILED_CHECK
public static final QName FAILED_CHECK
The signature or decryption was invalid
-
SECURITY_TOKEN_UNAVAILABLE
public static final QName SECURITY_TOKEN_UNAVAILABLE
Referenced security token could not be retrieved
-
MESSAGE_EXPIRED
public static final QName MESSAGE_EXPIRED
The message has expired
-
SECURITY_ERROR
public static final QName SECURITY_ERROR
Generic Security error
-
UNSUPPORTED_TOKEN_ERR
public static final String UNSUPPORTED_TOKEN_ERR
- See Also:
- Constant Field Values
-
UNSUPPORTED_ALGORITHM_ERR
public static final String UNSUPPORTED_ALGORITHM_ERR
- See Also:
- Constant Field Values
-
INVALID_SECURITY_ERR
public static final String INVALID_SECURITY_ERR
- See Also:
- Constant Field Values
-
INVALID_SECURITY_TOKEN_ERR
public static final String INVALID_SECURITY_TOKEN_ERR
- See Also:
- Constant Field Values
-
FAILED_AUTHENTICATION_ERR
public static final String FAILED_AUTHENTICATION_ERR
- See Also:
- Constant Field Values
-
FAILED_CHECK_ERR
public static final String FAILED_CHECK_ERR
- See Also:
- Constant Field Values
-
SECURITY_TOKEN_UNAVAILABLE_ERR
public static final String SECURITY_TOKEN_UNAVAILABLE_ERR
- See Also:
- Constant Field Values
-
MESSAGE_EXPIRED_ERR
public static final String MESSAGE_EXPIRED_ERR
- See Also:
- Constant Field Values
-
UNIFIED_SECURITY_ERR
public static final String UNIFIED_SECURITY_ERR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WSSecurityException
public WSSecurityException(WSSecurityException.ErrorCode errorCode)
-
WSSecurityException
public WSSecurityException(WSSecurityException.ErrorCode errorCode, String msgId)
-
WSSecurityException
public WSSecurityException(WSSecurityException.ErrorCode errorCode, Exception exception)
-
WSSecurityException
public WSSecurityException(WSSecurityException.ErrorCode errorCode, Exception exception, String msgId)
-
WSSecurityException
public WSSecurityException(WSSecurityException.ErrorCode errorCode, Exception exception, String msgId, Object[] arguments)
-
WSSecurityException
public WSSecurityException(WSSecurityException.ErrorCode errorCode, String msgId, Object[] arguments)
-
-
Method Detail
-
getErrorCode
public WSSecurityException.ErrorCode getErrorCode()
Get the error code.- Returns:
- error code of this exception See values above.
-
getFaultCode
public QName getFaultCode()
Get the fault code QName for this associated error code.- Returns:
- the fault code QName of this exception
-
getSafeExceptionMessage
public String getSafeExceptionMessage()
Get a "safe" / unified error message, so as not to leak internal configuration to an attacker.
-
getSafeFaultCode
public QName getSafeFaultCode()
Get the "safe" / unified fault code QName associated with this exception, so as not to leak internal configuration to an attacker
-
-