https://github.com/technion/pastspec
Some information on formalizing a spec and test suite for past tokens
https://github.com/technion/pastspec
Last synced: over 1 year ago
JSON representation
Some information on formalizing a spec and test suite for past tokens
- Host: GitHub
- URL: https://github.com/technion/pastspec
- Owner: technion
- License: epl-1.0
- Created: 2018-01-05T12:07:23.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-05T12:07:36.000Z (over 8 years ago)
- Last Synced: 2025-01-24T09:29:19.245Z (over 1 year ago)
- Language: Clojure
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# pastspec
Work at formalising the spec for [past](https://github.com/paragonie/past).
Please refer to past.bnf.
## Usage
Test an arbitrary token like this:
$ lein run token
Run the test suite with:
$ lein test
## Example
```
$ lein run "v1."
Parse error at line 1, column 4:
v1.
^
Expected one of:
sign
enc
auth
$ lein run "v2.auth.eyJkYXRhIjoidGhpcyBpcyBhIHNpZ25lZCBtZXNzYWdlIiwiZXhwIjoiMjAzOS0wMS0wMVQwMDowMDowM"
[:PAST [:V2 v2 [:SEP .] [:purpose auth] [:SEP .] [:payload [:b64urlsafe e] [:b64urlsafe y] [:b64urlsafe J] [:b64urlsafe k] [:b64urlsafe Y]
...
```
## Notes
For most users, there is more value in reading the documents and code than running it.
## License
Copyright © 2018
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.