Class AuthnAdapterResponse

java.lang.Object
com.pingidentity.sdk.AuthnAdapterResponse

public class AuthnAdapterResponse extends Object
This class defines a response from an IdP adapter.
Since:
6.4
  • Constructor Details

    • AuthnAdapterResponse

      public AuthnAdapterResponse()
  • Method Details

    • getAttributeMap

      public Map<String,Object> getAttributeMap()
      Get a map of attributes that uniquely identify the authenticated security context of the user. The keys of this map should be the same as the set of attributes defined as this adapters attribute contract in its AuthnAdapterDescriptor (IdpAuthenticationAdapter.getAdapterDescriptor()).

      The values in this map can be java.lang objects like strings or numbers, or they can be wrapped as instances of AttributeValue. For best compatibility with PingFederate features and external systems, values should either be strings or collections of strings. For string collections, it's recommended to wrap the collection as an AttributeValue using AttrValueSupport.make(Collection).

      This map will also be passed back to the adapter implementation on logout as the first parameter of the IdpAuthenticationAdapter.logoutAuthN(java.util.Map, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String) method. This enables the adapter to identify what session or security context to terminate during logout.

      Returns:
      a map of attributes
    • setAttributeMap

      public void setAttributeMap(Map<String,Object> attributeMap)
      Set a map of attributes that uniquely identify the authenticated security context of the user. Attributes should only be set when the authentication status is AuthnAdapterResponse.AUTHN_STATUS.SUCCESS.
      Parameters:
      attributeMap - a map of attributes
    • getAuthnStatus

      public AuthnAdapterResponse.AUTHN_STATUS getAuthnStatus()
      Get the status of an authentication returned from an IdP adapter.
      Returns:
      authentication status
    • setAuthnStatus

      public void setAuthnStatus(AuthnAdapterResponse.AUTHN_STATUS authnStatus)
      Set authentication status.
      Parameters:
      authnStatus -
    • getErrorCode

      public int getErrorCode()
      Get error code.
      Returns:
      error code
    • setErrorCode

      public void setErrorCode(int errorCode)
      Set error code.
      Parameters:
      errorCode -
    • getErrorMessage

      public String getErrorMessage()
      Get an error message. The message may be logged in audit log.
      Returns:
      error message
    • setErrorMessage

      public void setErrorMessage(String errorMessage)
      Set error message.
      Parameters:
      errorMessage -
    • getUsername

      public String getUsername()
      Get the username that has been authenticated or attempted.
      Returns:
      username
    • setUsername

      public void setUsername(String username)
      Set username that has been authenticated or attempted.
      Parameters:
      username -