CosmosDbAuthorization class

Class representing a CosmosDB authorization. This class holds both the token and the msDate which are used to populate the HTTP headers when sending a request to Azure CosmosDB:

  • token is sent via the authorization header,
  • msDate is sent via the x-ms-date header.
Implemented types

Constructors

CosmosDbAuthorization.new(String token, {String? msDate})
Directly build a CosmosDB authorization using the supplied token and msDate. The provided token will be stored after URI-encoding.
CosmosDbAuthorization.fromKey(Hmac? key, String method, String type, String resId)
Build a CosmosDB authorization using the supplied key and the target resource details.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
msDate String?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
token String
final

Methods

authorize(Request request) → void
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited