Class PassThroughAuthenticationResult
- java.lang.Object
-
- com.unboundid.directory.sdk.ds.types.PassThroughAuthenticationResult
-
@Mutable @ThreadSafety(level=NOT_THREADSAFE) public final class PassThroughAuthenticationResult extends java.lang.Object
This class provides a data structure that holds information about the result of an attempt to pass through authentication to an external service.
-
-
Constructor Summary
Constructors Constructor Description PassThroughAuthenticationResult(PassThroughAuthenticationResultCode resultCode)
Creates a new pass-through authentication result with the provided result code.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
getCustomLogElements()
Retrieves a map containing name-value pairs for custom elements that should be included in the bind result access log message.java.lang.String
getDiagnosticMessageForClient()
Retrieves a diagnostic message that should be included in the response to the client.java.lang.String
getRemoteUserIdentifier()
Retrieves an identifier for the user's account in the external service.PassThroughAuthenticationResultCode
getResultCode()
Retrieves a result code that provides a general classification for the result of the pass-through authentication attempt.void
setCustomLogElement(java.lang.String name, java.lang.Object value)
Sets a custom name-value pair that should be included in the bind result access log message.void
setDiagnosticMessageForClient(java.lang.String diagnosticMessageForClient)
Sets a diagnostic message that should be included in the response to the client.void
setRemoteUserIdentifier(java.lang.String remoteUserIdentifier)
Sets an identifier for the user's account in the external service.java.lang.String
toString()
Retrieves a string representation of this pass-through authentication result.void
toString(java.lang.StringBuilder buffer)
Appends a string representation of this pass-through authentication result to the provided buffer.
-
-
-
Constructor Detail
-
PassThroughAuthenticationResult
public PassThroughAuthenticationResult(@NotNull PassThroughAuthenticationResultCode resultCode)
Creates a new pass-through authentication result with the provided result code.- Parameters:
resultCode
- A result code that provides a general classification for the result of the pass-through authentication attempt. It must not benull
.
-
-
Method Detail
-
getResultCode
@NotNull public PassThroughAuthenticationResultCode getResultCode()
Retrieves a result code that provides a general classification for the result of the pass-through authentication attempt.- Returns:
- A result code that provides a general classification for the result of the pass-through authentication attempt.
-
getRemoteUserIdentifier
@Nullable public java.lang.String getRemoteUserIdentifier()
Retrieves an identifier for the user's account in the external service.- Returns:
- An identifier for the user's account in the external service, or
null
if the user could not be identified or no identifier is available.
-
setRemoteUserIdentifier
public void setRemoteUserIdentifier(@Nullable java.lang.String remoteUserIdentifier)
Sets an identifier for the user's account in the external service.- Parameters:
remoteUserIdentifier
- An identifier for the user's account in the external service. It may benull
if the user could not be identified or if no identifier is available.
-
getDiagnosticMessageForClient
@Nullable public java.lang.String getDiagnosticMessageForClient()
Retrieves a diagnostic message that should be included in the response to the client. If provided, it will also be included in the bind result access log message.- Returns:
- A diagnostic message that should be included in the response to
the client, or
null
if there should be no client-side diagnostic message.
-
setDiagnosticMessageForClient
public void setDiagnosticMessageForClient(@Nullable java.lang.String diagnosticMessageForClient)
Sets a diagnostic message that should be included in the response to the client. If provided, it will also be included in the bind result access log message.- Parameters:
diagnosticMessageForClient
- A diagnostic message that should be included in the response to the client. It may benull
if no client diagnostic message should be used.
-
getCustomLogElements
@NotNull public java.util.Map<java.lang.String,java.lang.Object> getCustomLogElements()
Retrieves a map containing name-value pairs for custom elements that should be included in the bind result access log message.- Returns:
- A map containing name-value pairs for custom elements that should
be included in the bind result access log message. It will not be
null
but may be empty.
-
setCustomLogElement
public void setCustomLogElement(@NotNull java.lang.String name, @Nullable java.lang.Object value)
Sets a custom name-value pair that should be included in the bind result access log message.- Parameters:
name
- The name for the log element. It must not benull
.value
- The value for the log element. It may benull
if any existing log element with the provided name should be removed.
-
toString
@NotNull public java.lang.String toString()
Retrieves a string representation of this pass-through authentication result.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of this pass-through authentication result.
-
-