Interface IAuthorizationProvider
Namespace: Oracle.NoSQL.SDK
Assembly: Oracle.NoSQL.SDK.dll
Syntax
public interface IAuthorizationProvider
Remarks
The authorization provider is set as AuthorizationProvider in the initial configuration used to create NoSQLClient instance. The authorization is required when using Oracle NoSQL Cloud Service as well as on-premise Oracle NoSQL Database in secure mode. Most applications do not need to implement this interface and can use one of the supplied authorization providers, IAMAuthorizationProvider for the Cloud Service or KVStoreAuthorizationProvider for on-premise NoSQL Database in secure mode. Alternatively, you may also create your own authorization provider by creating a class that implements this interface and setting its instance as AuthorizationProvider.
Normally, the authorization is supplied as part of HTTP headers in the request which includes the header names and values. In general, multiple headers may be required. For a common case where authorization is supplied via a single Authorization HTTP header, you may choose to extend AuthorizationStringProvider class.
If you are implementing a custom authorization provider that uses disposable resources, you can also implement the IDisposable interface. The driver will call Dispose() of the provider when NoSQLClient instance is disposed.
Methods
Name | Description |
---|---|
ApplyAuthorizationAsync(Request, HttpRequestMessage, CancellationToken) | Obtains and supplies the authorization information to the request. |
ConfigureAuthorization(NoSQLConfig) | Configures the provider. |