Package com.unboundid.ldap.sdk
Class OAUTHBEARERBindResult
java.lang.Object
com.unboundid.ldap.sdk.LDAPResult
com.unboundid.ldap.sdk.BindResult
com.unboundid.ldap.sdk.OAUTHBEARERBindResult
- All Implemented Interfaces:
LDAPResponse,Serializable
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class OAUTHBEARERBindResult
extends BindResult
This class provides a bind result that can provide access to the details of
a failed OAUTHBEARER SASL bind attempt.
- See Also:
-
Field Summary
Fields inherited from interface com.unboundid.ldap.protocol.LDAPResponse
NO_CONTROLS -
Constructor Summary
ConstructorsConstructorDescriptionOAUTHBEARERBindResult(BindResult bindResult) Creates a new OAUTHBEARER bind result from the provided single bind result.OAUTHBEARERBindResult(BindResult initialBindResult, BindResult finalBindResult) Creates a new OAUTHBEARER bind result from the provided pair of results, which correspond to the initial and final (if any) phases of bind processing. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the authorization error code obtained from the failure details object, if available.Retrieves a JSON object with additional information about a failed authentication attempt, if any.Retrieves the result obtained from the final bind attempt in the OAUTHBEARER authentication process, if any.Retrieves the result obtained from the initial bind attempt in the OAUTHBEARER authentication process.Retrieves the OpenID configuration URL obtained from the failure details object, if available.Retrieves the set of scopes included in the failure details object, if available.voidtoString(StringBuilder buffer) Appends a string representation of this LDAP result to the provided buffer.Methods inherited from class com.unboundid.ldap.sdk.BindResult
getServerSASLCredentialsMethods inherited from class com.unboundid.ldap.sdk.LDAPResult
getDiagnosticMessage, getMatchedDN, getMessageID, getOperationType, getReferralURLs, getResponseControl, getResponseControls, getResultCode, getResultString, hasResponseControl, hasResponseControl, toString
-
Constructor Details
-
OAUTHBEARERBindResult
Creates a new OAUTHBEARER bind result from the provided single bind result. The provided result is not expected to contain server SASL credentials, but it will attempt to decode any credentials included in the provided result.- Parameters:
bindResult- The bind result to use to create this OAUTHBEARER bind result. It must not benull.
-
OAUTHBEARERBindResult
public OAUTHBEARERBindResult(@NotNull BindResult initialBindResult, @Nullable BindResult finalBindResult) Creates a new OAUTHBEARER bind result from the provided pair of results, which correspond to the initial and final (if any) phases of bind processing.- Parameters:
initialBindResult- The result obtained in response to the initial OAUTHBEARER bind request. It must not benull.finalBindResult- The result obtained in response to the final OAUTHBEARER bind request, if any. It may benullif the bind consisted of only a single request.
-
-
Method Details
-
getInitialBindResult
Retrieves the result obtained from the initial bind attempt in the OAUTHBEARER authentication process. For a successful authentication, there should only be a single bind. For a failed authentication attempt, there may be either one or two binds, based on whether credentials were included in the initial bind result.- Returns:
- The result obtained from the initial bind attempt in the OAUTHBEARER authentication process.
-
getFinalBindResult
Retrieves the result obtained from the final bind attempt in the OAUTHBEARER authentication process, if any. This should always benullfor a successful bind, and it may or may not benullfor a failed attempt, based on whether credentials were included in the initial bind result.- Returns:
- The result obtained for the final bind attempt in the
OAUTHBEARER authentication process, or
nullif the authentication process only included a single bind.
-
getFailureDetailsObject
Retrieves a JSON object with additional information about a failed authentication attempt, if any.- Returns:
- A JSON object with additional information about a failed
authentication attempt, or
nullthis is not available.
-
getAuthorizationErrorCode
Retrieves the authorization error code obtained from the failure details object, if available.- Returns:
- The authorization error code obtained from the failure details
object, or
nullif no failure details object was provided or if it did not include an authorization error code.
-
getScopes
Retrieves the set of scopes included in the failure details object, if available.- Returns:
- The set of scopes included in teh failure details object, or an empty set if no failure details object was provided or if it did not include any scopes.
-
getOpenIDConfigurationURL
Retrieves the OpenID configuration URL obtained from the failure details object, if available.- Returns:
- The OpenID configuration URL obtained from the failure details
object, or
nullif no failure details object was provided or if it did not include an OpenID configuration URL.
-
toString
Appends a string representation of this LDAP result to the provided buffer.- Specified by:
toStringin interfaceLDAPResponse- Overrides:
toStringin classBindResult- Parameters:
buffer- The buffer to which to append a string representation of this LDAP result.
-