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 SummaryModifier and TypeMethodDescriptionvoidclose()Release resources provider is using.default voidInvalidate any cached authorization strings.default booleanforCloud()Indicates whether or not the instance is used for the cloud servicegetAuthorizationString(Request request) Returns an authorization string for specified request.default voidsetRequiredHeaders(String authString, Request request, io.netty.handler.codec.http.HttpHeaders headers, byte[] content) Set HTTP headers required by the provider.default voidvalidateAuthString(String input) Validates the authentication string.
- 
Method Details- 
getAuthorizationStringReturns 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
 
- 
closevoid close()Release resources provider is using.
- 
validateAuthStringValidates 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
 
- 
setRequiredHeadersdefault void setRequiredHeaders(String authString, Request request, io.netty.handler.codec.http.HttpHeaders headers, byte[] content) Set HTTP headers required by the provider.- Parameters:
- authString- the authorization string for the request
- request- the request being processed
- headers- the HTTP headers
- content- the request content bytes
 
- 
flushCachedefault void flushCache()Invalidate any cached authorization strings.
- 
forClouddefault boolean forCloud()Indicates whether or not the instance is used for the cloud service- Returns:
- false by default
 
 
-