sigv4 2.0.0 copy "sigv4: ^2.0.0" to clipboard
sigv4: ^2.0.0 copied to clipboard

discontinued
outdated

Library for signing AWS requests with Signature Version 4

sigv4 #

A Dart library for signing AWS requests with Signature Version 4.

Usage #

Create a Sigv4Client. This will hold your secrets and configuration. Some omitted default values:

  • region defaults to eu-west-1
  • serviceNamedefaults to execute-api
final client = Sigv4Client(
  accessKey: 'your_access_key',
  secretKey: 'your_secret_key',
);

The easier way to create a request is by getting a package:http request object:

// A simple GET-request
final request = client.request('https://service.aws.com/endpoint');
// package:http get
get(request.url, headers: request.headers);

// A larger request
final request = client.request(
  'https://service.aws.com/endpoint',
  method: 'POST',
  queryParameters: {'key': 'value'},
  headers: {'header': 'value'},
  body: {'content': 'some-content'},
);
// package:http post
post(request.url, headers: request.headers, body: request.body);

Alternatively, you can get the canonical string and signed headers separately:

final path = 'https://service.aws.com/endpoint';
final queryParameters = {'key': 'value'};

final url = client.canonicalUrl(path, queryParameters: queryParameters);
final headers = client.signedHeaders(
  path,
  queryParameters: queryParameters,
);

// package:http get
get(url, headers: headers);

Signing #

7
likes
0
pub points
79%
popularity

Publisher

verified publisherarnemolland.com

Library for signing AWS requests with Signature Version 4

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

convert, crypto, http

More

Packages that depend on sigv4