SignatureProvider class abstract

Supplies request signatures from somewhere other than this process.

Lets a Flutter or web client perform signed uploads while the API secret stays on a server you control. Implement this against your own signing endpoint and pass it to Cloudinary.unsigned.

class MySigner implements SignatureProvider {
  @override
  Future<RemoteSignature> sign(Map<String, dynamic> params) async {
    final res = await myBackend.post('/cloudinary/sign', params);
    return RemoteSignature(
      signature: res['signature'],
      timestamp: res['timestamp'],
      apiKey: res['api_key'],
    );
  }
}

Constructors

SignatureProvider()
Allows subclasses to be const.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sign(Map<String, dynamic> params) → Future<RemoteSignature>
Signs params and returns the signature alongside the values it was computed with.
toString() → String
A string representation of this object.
inherited

Operators

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