Class AuthenticationFailedException

All Implemented Interfaces:
OperationResult, XMLMarshallable, Serializable

public class AuthenticationFailedException extends OperationFailureException
Exception thrown when an error occurs during the authentication of the SAP CC user that is the message originator.

Reasons

The possible reasons are:

  • invalid_login_or_password: There is no match for the logon/password combination
  • locked_user: The SAP CC user is locked
  • expired_password: The password of the SAP CC user has expired. This error can only occur if the advanced. password management feature is enabled.
  • communication_error: A communication error occurred with the authentication server or with the database server system
  • invalid_permission: The SAP CC user does not have enough permissions to authenticate on the server system
  • invalid_session_id: The session identifier specified in the XML envelope does not match any existing user session
  • invalid_session_user: The SAP CC user specified is not linked to the specified session identifier
  • session_limit_reached: There are too many sessions for the same user and tool
  • password_change_needed: The SAP CC user must change his password at his next logon. This error can only occur if the advanced password management feature is enabled.
  • channel_not_allowed: The SAP CC user is a technical user (service user) and the user isolation feature is enabled
See Also:

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="authenticationFailedFault">
   <xs:complexType>
     <xs:attribute name="reason" type="authenticationFailedReason"/>
     <xs:attribute name="message" type="xs:string"/>
   </xs:complexType>
 </xs:element>

 <xs:simpleType name="authenticationFailedReason">
   <xs:restriction base="xs:string">
     <xs:enumeration value="invalid_login_or_password"/>
     <xs:enumeration value="expired_password"/>
     <xs:enumeration value="locked_user"/>
     <xs:enumeration value="communication_error"/>
     <xs:enumeration value="invalid_permission"/>
     <xs:enumeration value="invalid_session_id"/>
     <xs:enumeration value="invalid_session_user"/>
     <xs:enumeration value="session_limit_reached"/>
     <xs:enumeration value="password_change_needed"/>
     <xs:enumeration value="channel_not_allowed"/>
     <xs:enumeration value="null_token"/>     
     <xs:enumeration value="invalid_token"/>     
     <xs:enumeration value="expired_token"/>     
     <xs:enumeration value="invalid_claim"/>     
     <xs:enumeration value="missing_certificate"/>     
     <xs:enumeration value="invalid_certificate"/>     
     <xs:enumeration value="invalid_delegation"/>     
   </xs:restriction>
 </xs:simpleType>

  • Field Details

    • INVALID_LOGIN_OR_PASSWORD

      public static final int INVALID_LOGIN_OR_PASSWORD
      0: Constant for the invalid_login_or_password error
      See Also:
    • EXPIRED_PASSWORD

      public static final int EXPIRED_PASSWORD
      1: Constant for the expired_password error
      See Also:
    • LOCKED_USER

      public static final int LOCKED_USER
      2: Constant for the locked_user error
      See Also:
    • COMMUNICATION_ERROR

      public static final int COMMUNICATION_ERROR
      3: Constant for the communication_error error
      See Also:
    • INVALID_PERMISSION

      public static final int INVALID_PERMISSION
      4: Constant for the invalid_permission error
      See Also:
    • INVALID_SESSION_ID

      public static final int INVALID_SESSION_ID
      5: Constant for the invalid_session_id error
      See Also:
    • INVALID_SESSION_USER

      public static final int INVALID_SESSION_USER
      6: Constant for the invalid_session_user error
      See Also:
    • SESSION_LIMIT_REACHED

      public static final int SESSION_LIMIT_REACHED
      7: Constant for the session_limit_reached error
      See Also:
    • PASSWORD_CHANGE_NEEDED

      public static final int PASSWORD_CHANGE_NEEDED
      8: Constant for the password_change_needed error
      See Also:
    • CHANNEL_NOT_ALLOWED

      public static final int CHANNEL_NOT_ALLOWED
      9: Constant for the channel_not_allowed error
      See Also:
    • NULL_TOKEN

      public static final int NULL_TOKEN
      10: Constant for the null_token error
      See Also:
    • INVALID_TOKEN

      public static final int INVALID_TOKEN
      11: Constant for the invalid_token error
      See Also:
    • EXPIRED_TOKEN

      public static final int EXPIRED_TOKEN
      12: Constant for the expired_token error
      See Also:
    • INVALID_CLAIM

      public static final int INVALID_CLAIM
      13: Constant for the invalid_claim error
      See Also:
    • MISSING_CERTIFICATE

      public static final int MISSING_CERTIFICATE
      14: Constant for the missing_certificate error
      See Also:
    • INVALID_CERTIFICATE

      public static final int INVALID_CERTIFICATE
      15: Constant for the invalid_certificate error
      See Also:
    • INVALID_DELEGATION

      public static final int INVALID_DELEGATION
      16: Constant for the invalid_delegation error
      See Also:
  • Constructor Details

    • AuthenticationFailedException

      public AuthenticationFailedException()
      Constructs an empty exception.
    • AuthenticationFailedException

      public AuthenticationFailedException(int reason, String message)
      Constructs an exception with a reason and a message.
      Parameters:
      reason - The numerical reason code of the exception
      message - The text message of the exception
  • Method Details

    • getReason

      public int getReason()
      Returns the numeric reason code of the exception.
      Returns:
      The numerical reason code of the exception
    • getMessage

      public String getMessage()
      Returns the text message of the exception.
      Overrides:
      getMessage in class Throwable
      Returns:
      The detailed message of the exception
    • setReason

      public void setReason(int reason)
      Sets the numeric reason code of the exception.
      Parameters:
      reason - The numerical reason code of the exception
    • setMessage

      public void setMessage(String message)
      Sets the message of the exception.
      Parameters:
      message - The message of the exception
    • setAttributes

      public void setAttributes(XMLAttributes atts)
      Description copied from interface: XMLMarshallable
      Sets the attributes of the XML representation of the element being processed.
      Parameters:
      atts - The XML attributes of the current element
    • addCharacterData

      public void addCharacterData(String cData)
      Description copied from interface: XMLMarshallable
      Adds character data to the content element.
      Parameters:
      cData - The character data to be added
    • addChild

      public void addChild(String tagName, XMLMarshallable child)
      Description copied from interface: XMLMarshallable
      Adds a child to the object, the child representing the marshallable object which must be added to the element.
      Parameters:
      tagName - The name of tag for the child
      child - The child to be added
    • marshal

      public void marshal(XMLOutputter output)
      Description copied from interface: XMLMarshallable
      Gives an XML representation of this object, including its children.
      Parameters:
      output - The XML output to marshal the object into
    • getOperandReference

      public String getOperandReference()
      Description copied from interface: OperationResult
      Gets the code or the reference (if no code exists) that identifies the operand of the operation request; If the operation is not auditable, the operand reference is null.
      Specified by:
      getOperandReference in interface OperationResult
      Overrides:
      getOperandReference in class OperationFailureException
      Returns:
      The operand reference of the operation result