Readme: Added basic information. docs...: added godoc information to jws/jwt
diff --git a/README.md b/README.md index 5082dfe..1cc9234 100644 --- a/README.md +++ b/README.md
@@ -1,2 +1,39 @@ -# jose -A comprehensive set of JWT, JWS, and JWE libraries. +JOSE +============ + +JOSE is a comprehensive set of JWT, JWS, and JWE libraries. + +## Why + +The only other JWS/JWE/JWT implementations are specific to JWT, and none +were particularly pleasant to work with. + +These libraries should provide an easy, straightforward way to securely +create, parse, and validate JWS, JWE, and JWTs. + +## Notes: +JWE is currently unimplemented, but should be completed in a week. + +## Version 0.9: +Currently not version 1.0 yet. + +The API will be 100% solidified with the 1.0 release and no API-breaking +changes will be made without incrementing the major version number. + +## Documentation + +The docs can be found at [godoc.org] [docs], as usual. + +### [JWS RFC][jws] +### [JWE RFC][jwe] +### [JWT RFC][jwt] + +## License + +[MIT] [license]. + +[docs]: https://godoc.org/github.com/SermoDigital/jose +[license]: https://github.com/SermoDigital/jose/blob/master/LICENSE.md +[jws]: https://tools.ietf.org/html/rfc7515 +[jwe]: https://tools.ietf.org/html/rfc7515 +[jwt]: https://tools.ietf.org/html/rfc7519
diff --git a/doc.go b/doc.go new file mode 100644 index 0000000..7abb7bf --- /dev/null +++ b/doc.go
@@ -0,0 +1,3 @@ +// Package jose implements some helper functions and types for the children +// packages, jws, jwt, and jwe. +package jose
diff --git a/jws/doc.go b/jws/doc.go new file mode 100644 index 0000000..fa2409d --- /dev/null +++ b/jws/doc.go
@@ -0,0 +1,2 @@ +// Package jwt implements JWSs per RFC 7515 +package jose
diff --git a/jwt/claims.go b/jwt/claims.go index 1955400..8f53d65 100644 --- a/jwt/claims.go +++ b/jwt/claims.go
@@ -6,11 +6,12 @@ "github.com/SermoDigital/jose" ) -// Claims implements a JOSE Claim set with the addition of some helper +// Claims implements a set of JOSE Claims with the addition of some helper // methods, similar to net/url.Values. type Claims map[string]interface{} -// Validate ... +// Validate validates the Claims per the claims found in +// https://tools.ietf.org/html/rfc7519#section-4.1 func (c Claims) Validate(now, expLeeway, nbfLeeway int64) error { if exp, ok := c.expiration(); ok { if !within(exp, expLeeway, now) {
diff --git a/jwt/doc.go b/jwt/doc.go new file mode 100644 index 0000000..96483fc --- /dev/null +++ b/jwt/doc.go
@@ -0,0 +1,2 @@ +// Package jwt implements JWTs per RFC 7519 +package jose