Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/taylorfinnell/awscr-signer
AWS request signing in Crystal
https://github.com/taylorfinnell/awscr-signer
aws aws-signature aws-v2 aws-v4 crystal signing
Last synced: 15 days ago
JSON representation
AWS request signing in Crystal
- Host: GitHub
- URL: https://github.com/taylorfinnell/awscr-signer
- Owner: taylorfinnell
- License: mit
- Created: 2016-12-15T02:27:50.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-05-24T20:56:29.000Z (over 2 years ago)
- Last Synced: 2024-08-01T17:36:37.281Z (3 months ago)
- Topics: aws, aws-signature, aws-v2, aws-v4, crystal, signing
- Language: Crystal
- Homepage:
- Size: 151 KB
- Stars: 22
- Watchers: 3
- Forks: 15
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-crystal - awscr-signer - Sign HTTP::Request objects and generate presigned post forms (Third-party APIs)
- awesome-crystal - awscr-signer - Sign HTTP::Request objects and generate presigned post forms (Third-party APIs)
- awesome-crystal - awscr-signer - Sign HTTP::Request objects and generate presigned post forms (Third-party APIs)
README
# awscr-signer
[![Build Status](https://travis-ci.org/taylorfinnell/awscr-signer.svg?branch=master)](https://travis-ci.org/taylorfinnell/awscr-signer)Crystal interface for AWS Signing.
Supports signing or presigning Crystal `HTTP::Request` objects.
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
awscr-signer:
github: taylorfinnell/awscr-signer
```## Usage
**Create a `Signer::Signers::V4` object.**
```crystal
signer = Awscr::Signer::Signers::V4.new("service", "region", "key", "secret")
```or
**Create a `Signer::Signers::V2` object.**
```crystal
signer = Awscr::Signer::Signers::V2.new("service", "region", "key", "secret")
```**Signing an `HTTP::Request`.**
```crystal
signer.sign(request)
```**Signing an `String`.**
```crystal
signer.sign("my string")
```**Presign a `HTTP::Request`.**
```crystal
signer.presign(request)
```[Examples](https://github.com/taylorfinnell/awscr-signer/tree/master/examples)
S3
===For S3 specific support see [awscr-s3](https://github.com/taylorfinnell/awscr-s3/).
Known Limitations
===The following items are known issues.
- The request URI can not contain repeating slashes.
- The request headers can not have new line separted values.
- The request path can not contain spaces.