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.default voidflushCache()Invalidate any cached authorization strings.StringgetAuthorizationString(Request request)Returns an authorization string for specified request.default voidsetRequiredHeaders(String authString, Request request, io.netty.handler.codec.http.HttpHeaders headers)Set HTTP headers required by the provider.default voidvalidateAuthString(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 requestrequest- the request being processedheaders- the HTTP headers
-
flushCache
default void flushCache()
Invalidate any cached authorization strings.
-
-