Class OAUTHBEARERBindResult

All Implemented Interfaces:
LDAPResponse, Serializable

This class provides a bind result that can provide access to the details of a failed OAUTHBEARER SASL bind attempt.
See Also:
  • 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 be null.
    • 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 be null.
      finalBindResult - The result obtained in response to the final OAUTHBEARER bind request, if any. It may be null if 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 be null for a successful bind, and it may or may not be null for 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 null if 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 null this 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 null if 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 null if no failure details object was provided or if it did not include an OpenID configuration URL.
    • toString

      public void toString(@NotNull StringBuilder buffer)
      Appends a string representation of this LDAP result to the provided buffer.
      Specified by:
      toString in interface LDAPResponse
      Overrides:
      toString in class BindResult
      Parameters:
      buffer - The buffer to which to append a string representation of this LDAP result.