Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sashka/signedvalue
Compatibility layer for tornado's signed values (and secure cookies consequently)
https://github.com/sashka/signedvalue
auth go golang secure-cookies tornado tornado-framework
Last synced: 3 months ago
JSON representation
Compatibility layer for tornado's signed values (and secure cookies consequently)
- Host: GitHub
- URL: https://github.com/sashka/signedvalue
- Owner: sashka
- License: mit
- Archived: true
- Created: 2018-01-06T05:57:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-21T20:10:59.000Z (over 4 years ago)
- Last Synced: 2024-01-15T00:52:31.312Z (5 months ago)
- Topics: auth, go, golang, secure-cookies, tornado, tornado-framework
- Language: Go
- Homepage:
- Size: 25.4 KB
- Stars: 10
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-golang-repositories - signedvalue
- awesome-go - signedvalue
- awesome-go-with-framework - signedvalue - Signed and timestamped strings compatible with [Tornado's](https://github.com/tornadoweb/tornado) `create_signed_value`, `decode_signed_value`, and therefore `set_secure_cookie` and `get_secure_cookie`. (Authentication and OAuth)
- awesome-go - signedvalue - Signed and timestamped strings compatible with [Tornado's](https://github.com/tornadoweb/tornado) `create_signed_value`, `decode_signed_value`, and therefore `set_secure_cookie` and `get_secure_cookie`. (Authentication and OAuth)
- awesome-reader - signedvalue - Signed and timestamped strings compatible with [Tornado's](https://github.com/tornadoweb/tornado) `create_signed_value`, `decode_signed_value`, and therefore `set_secure_cookie` and `get_secure_cookie`. (Authentication and OAuth)
- awesome-Char - signedvalue - Signed and timestamped strings compatible with [Tornado's](https://github.com/tornadoweb/tornado) `create_signed_value`, `decode_signed_value`, and therefore `set_secure_cookie` and `get_secure_cookie`. (Authentication and OAuth / Contents)
- awesome-go - signedvalue - Signed and timestamped strings compatible with [Tornado's](https://github.com/tornadoweb/tornado) `create_signed_value`, `decode_signed_value`, and therefore `set_secure_cookie` and `get_secure_cookie`. (Authentication and OAuth)
- awesome-go-cn - signedvalue
- awesome-go-handwritten - signedvalue - Signed and timestamped strings compatible with [Tornado's](https://github.com/tornadoweb/tornado) `create_signed_value`, `decode_signed_value`, and therefore `set_secure_cookie` and `get_secure_cookie`. (Authentication and OAuth)
- awesome-go - signedvalue - Signed and timestamped strings compatible with [Tornado's](https://github.com/tornadoweb/tornado) `create_signed_value`, `decode_signed_value`, and therefore `set_secure_cookie` and `get_secure_cookie`. (Authentication and OAuth)
- awesome-go - signedvalue - Signed and timestamped strings compatible with [Tornado's](https://github.com/tornadoweb/tornado) `create_signed_value`, `decode_signed_value`, and therefore `set_secure_cookie` and `get_secure_cookie`. - :arrow_down:0 - :star:5 (Authentication and OAuth)
- awesome-go - signedvalue - Compatibility layer for tornado's signed values (and secure cookies consequently) - ★ 5 (Authentication and OAuth)
- awesome-go-cn - signedvalue
README
signedvalue
===========signedvalue is an implementation of signed and timestamped strings compatible with Tornado's
`create_signed_value`, `decode_signed_value`, and therefore
[set_secure_cookie](http://www.tornadoweb.org/en/stable/web.html#tornado.web.RequestHandler.set_secure_cookie) and
[get_secure_cookie](http://www.tornadoweb.org/en/stable/web.html#tornado.web.RequestHandler.get_secure_cookie).Install
-------
```bash
go get github.com/sashka/signedvalue
```Usage
-----
```go
import "github.com/sashka/signedvalue"// Sign your "Hello, world".
signed := signedvalue.Create("secret", "name", "Hello, world")// Decode a signed string.
// Treat signed string as invalid if it's more than 1 minute old.
decoded, err := signedvalue.Decode("secret", "name", signed, 60)
if err != nil {
// Signed string is no longer valid.
}
```Contributing
------------
Pull requests are kindly welcome.