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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAuthnAdapterResponse.AUTHN_STATUS
-
Constructor Summary
Constructors Constructor Description AuthnAdapterResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>getAttributeMap()Get a map of attributes that uniquely identify the authenticated security context of the user.AuthnAdapterResponse.AUTHN_STATUSgetAuthnStatus()Get the status of an authentication returned from an IdP adapter.intgetErrorCode()Get error code.StringgetErrorMessage()Get an error message.StringgetUsername()Get the username that has been authenticated or attempted.voidsetAttributeMap(Map<String,Object> attributeMap)Set a map of attributes that uniquely identify the authenticated security context of the user.voidsetAuthnStatus(AuthnAdapterResponse.AUTHN_STATUS authnStatus)Set authentication status.voidsetErrorCode(int errorCode)Set error code.voidsetErrorMessage(String errorMessage)Set error message.voidsetUsername(String username)Set username that has been authenticated or attempted.
-
-
-
Method Detail
-
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.langobjects like strings or numbers, or they can be wrapped as instances ofAttributeValue. 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 anAttributeValueusingAttrValueSupport.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 isAuthnAdapterResponse.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-
-
-