notary 0.0.2 copy "notary: ^0.0.2" to clipboard
notary: ^0.0.2 copied to clipboard

outdatedDart 1 only

Server-side library simplifying signing Google Cloud Storage HTTP requests to authorize file access (upload, download, etc.) via your website.

notary #

Server-side library simplifying signing Google Cloud Storage HTTP requests to authorize file access (upload, download, etc.) via your website.

Sample usage #

Notary.sign(
  "<my-storage-id>@developer.gserviceaccount.com",
  "my-private-key.pem",
  "GET",
  10 * 60 /* 10 min */,
  "/my-bucket/my-file.txt"
)
.catchError((e) {
  print("An error occured: $e");
})
.then((SignedRequest signedRequest) {
  if (signedRequest != null) {
    print("Signed URL: ${signedRequest.url}");
  }
});

Note #

  • The first parameter (googleAccessStorageId) is the email-form of the client ID. This ID can be viewed in the authentication section of the Google Cloud console.
  • The .PEM file can be extracted from the .p12 file (obtained via the Google Cloud console) using openssl. E.g.: openssl pkcs12 -nocerts -nodes -passin pass:notasecret -in my-private-key.p12 | openssl rsa -out my-private-key.pem
0
likes
0
points
3
downloads

Publisher

unverified uploader

Weekly Downloads

Server-side library simplifying signing Google Cloud Storage HTTP requests to authorize file access (upload, download, etc.) via your website.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

crypto, googleapis_auth

More

Packages that depend on notary