Package com.azure.cosmos.models
Interface CosmosAuthorizationTokenResolver
public interface CosmosAuthorizationTokenResolver
This interface is for client side implementation, which can be used for initializing
CosmosAsyncClient without passing master key, resource token and permission feed.
Each time the SDK create request for CosmosDB, authorization token is generated based on that request at client side which enables creation of one CosmosAsyncClient per application shared across various users with different resource permissions.
Each time the SDK create request for CosmosDB, authorization token is generated based on that request at client side which enables creation of one CosmosAsyncClient per application shared across various users with different resource permissions.
-
Method Summary
-
Method Details
-
getAuthorizationToken
String getAuthorizationToken(String requestVerb, String resourceIdOrFullName, String resourceType, Map<String, Object> properties) This method will consume the request information and based on that it will generate the authorization token.- Parameters:
properties
- the user properties.requestVerb
- Request verb i.e. GET, POST, PUT etc.resourceIdOrFullName
- ResourceID or resource full name.resourceType
- Resource type i.e. Database, DocumentCollection, Document etc.- Returns:
- The authorization token.
-