Package oracle.nosql.driver
Interface AuthorizationProvider
-
- All Known Implementing Classes:
SignatureProvider,StoreAccessTokenProvider
public interface AuthorizationProviderA callback interface used by the driver to obtain an authorization string for a request.NoSQLHandlecalls 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 voidclose()Release resources provider is using.java.lang.StringgetAuthorizationString(Request request)Returns an authorization string for specified request.default voidsetRequiredHeaders(java.lang.String authString, Request request, io.netty.handler.codec.http.HttpHeaders headers)Set HTTP headers required by the provider.default voidvalidateAuthString(java.lang.String input)Validates the authentication string.
-
-
-
Method Detail
-
getAuthorizationString
java.lang.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(java.lang.String input)
Validates the authentication string. This method is optional and by default it will not allow a null string.- Throws:
java.lang.IllegalArgumentException- if the authentication string is null
-
setRequiredHeaders
default void setRequiredHeaders(java.lang.String authString, Request request, io.netty.handler.codec.http.HttpHeaders headers)Set HTTP headers required by the provider.- Parameters:
request- the request being processedheaders- the HTTP headers
-
-