Package oracle.nosql.driver

## Interface AuthorizationProvider

- All Known Implementing Classes:
    `SignatureProvider`, `StoreAccessTokenProvider`

      public interface AuthorizationProvider

  A callback interface used by the driver to obtain an authorization string for a request. `NoSQLHandle` calls this interface when and authorization string is required. In general applications need not implement this interface, instead using the default mechanisms.

  Instances of this interface must be reentrant and thread-safe.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `close()` | Release resources provider is using.
    `String` | `getAuthorizationString​(Request request)` | Returns an authorization string for specified request.
    `default void` | `setRequiredHeaders​(String authString, Request request, io.netty.handler.codec.http.HttpHeaders headers)` | Set HTTP headers required by the provider.
    `default void` | `validateAuthString​(String input)` | Validates the authentication string.

- - ### Method Detail

    - #### getAuthorizationString

          String getAuthorizationString​(Request request)

      Returns an authorization string for specified request. This is sent to the server in the request for authorization. Authorization information can be request-dependent.
      Parameters:
        `request` - the request being processed
      Returns:
        a string indicating that the application is authorized to perform the request

    - #### close

          void close()

      Release resources provider is using.

    - #### validateAuthString

          default void validateAuthString​(String input)

      Validates the authentication string. This method is optional and by default it will not allow a null string.
      Parameters:
        `input` - the string to authorize
      Throws:
        `IllegalArgumentException` - if the authentication string is null

    - #### setRequiredHeaders

          default void setRequiredHeaders​(String authString,
                                          Request request,
                                          io.netty.handler.codec.http.HttpHeaders headers)

      Set HTTP headers required by the provider.
      Parameters:
        `authString` - the authorization string for the request
        `request` - the request being processed
        `headers` - the HTTP headers