Class AuthnAdapterResponse
- Since:
- 6.4
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet a map of attributes that uniquely identify the authenticated security context of the user.Get the status of an authentication returned from an IdP adapter.intGet error code.Get an error message.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.
-
Constructor Details
-
AuthnAdapterResponse
public AuthnAdapterResponse()
-
-
Method Details
-
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
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
Get the status of an authentication returned from an IdP adapter.- Returns:
- authentication status
-
setAuthnStatus
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
Get an error message. The message may be logged in audit log.- Returns:
- error message
-
setErrorMessage
Set error message.- Parameters:
errorMessage-
-
getUsername
Get the username that has been authenticated or attempted.- Returns:
- username
-
setUsername
Set username that has been authenticated or attempted.- Parameters:
username-
-