org.apache.wss4j.common.ext
Class WSSecurityException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.apache.xml.security.exceptions.XMLSecurityException
              extended by org.apache.wss4j.common.ext.WSSecurityException
All Implemented Interfaces:
Serializable

public class WSSecurityException
extends org.apache.xml.security.exceptions.XMLSecurityException

Exception class for WS-Security.

See Also:
Serialized Form

Nested Class Summary
static class WSSecurityException.ErrorCode
           
 
Field Summary
static QName FAILED_AUTHENTICATION
          The security token could not be authenticated or authorized
static String FAILED_AUTHENTICATION_ERR
           
static QName FAILED_CHECK
          The signature or decryption was invalid
static String FAILED_CHECK_ERR
           
static QName INVALID_SECURITY
          An error was discovered processing the header
static String INVALID_SECURITY_ERR
           
static QName INVALID_SECURITY_TOKEN
          An invalid security token was provided
static String INVALID_SECURITY_TOKEN_ERR
           
static QName MESSAGE_EXPIRED
          The message has expired
static String MESSAGE_EXPIRED_ERR
           
static String NS_WSSE10
          Fault codes defined in the WSS 1.1 spec under section 12, Error handling
static QName SECURITY_TOKEN_UNAVAILABLE
          Referenced security token could not be retrieved
static String SECURITY_TOKEN_UNAVAILABLE_ERR
           
static QName UNSUPPORTED_ALGORITHM
          An unsupported signature or encryption algorithm was used
static String UNSUPPORTED_ALGORITHM_ERR
           
static QName UNSUPPORTED_SECURITY_TOKEN
          An unsupported token was provided
static String UNSUPPORTED_TOKEN_ERR
           
 
Fields inherited from class org.apache.xml.security.exceptions.XMLSecurityException
msgID
 
Constructor Summary
WSSecurityException(WSSecurityException.ErrorCode errorCode)
          Constructor.
WSSecurityException(WSSecurityException.ErrorCode errorCode, Exception exception)
           
WSSecurityException(WSSecurityException.ErrorCode errorCode, String msgId, Exception exception)
          Constructor.
WSSecurityException(WSSecurityException.ErrorCode errorCode, String msgId, Exception exception, Object... arguments)
          Constructor.
WSSecurityException(WSSecurityException.ErrorCode errorCode, String msgId, Object... arguments)
          Constructor.
 
Method Summary
 WSSecurityException.ErrorCode getErrorCode()
          Get the error code.
 QName getFaultCode()
          Get the fault code QName for this associated error code.
 String getSafeExceptionMessage()
          Map a WSSecurityException FaultCode to a standard error String, 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
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 the header


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


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
Constructor Detail

WSSecurityException

public WSSecurityException(WSSecurityException.ErrorCode errorCode,
                           String msgId,
                           Exception exception,
                           Object... arguments)
Constructor.

Parameters:
errorCode -
msgId -
exception -
arguments -

WSSecurityException

public WSSecurityException(WSSecurityException.ErrorCode errorCode,
                           String msgId,
                           Exception exception)
Constructor.

Parameters:
errorCode -
msgId -
exception -

WSSecurityException

public WSSecurityException(WSSecurityException.ErrorCode errorCode,
                           Exception exception)

WSSecurityException

public WSSecurityException(WSSecurityException.ErrorCode errorCode,
                           String msgId,
                           Object... arguments)
Constructor.

Parameters:
errorCode -
msgId -
arguments -

WSSecurityException

public WSSecurityException(WSSecurityException.ErrorCode errorCode)
Constructor.

Parameters:
errorCode -
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()
Map a WSSecurityException FaultCode to a standard error String, so as not to leak internal configuration to an attacker.



Copyright © 2004–2014 The Apache Software Foundation. All rights reserved.