Commit graph

20 commits

Author SHA1 Message Date
Peter Kieltyka
fc3832839d jwtauth.New to accept jwt.ValidateOptions 2023-11-21 15:57:10 -05:00
Nicola Murino
84b5aa8ecb
use jwx v2 (#73) 2022-11-13 11:18:43 -05:00
kvii
137d669fb7
remove unnecessary code. (#69) 2022-02-09 06:21:49 -05:00
Peter Kieltyka
9448513887 v5.0.0 2021-02-27 19:23:25 -05:00
Peter Kieltyka
b8af768272
Switch to github.com/lestrrat-go/jwx underlying jwt library (#52) 2020-12-12 09:40:27 -05:00
Peter Kieltyka
6b6475598c revert use of go mod in chi v4 2019-01-09 10:18:50 -05:00
Vojtech Vitek
7ae401cf04 Update to github.com/go-chi/chi/v4 2019-01-08 18:40:54 -05:00
Jonathan ES Lin
ea7d7e213f Remove unnecessary code and clean up errors (#30)
* Initial refactor

* Fix some of the tests

* Handle more specific errors from jwt library

* Fix comments

* Rename package

* Verify signing algo after nil check
2018-09-26 10:43:54 -07:00
Peter Kieltyka
ace6ea2799 Lint fix, rename JwtAuth to JWTAuth 2017-11-26 10:34:54 -05:00
Emil Nikolov
050a030f1c Changed the expected key type from []byte to interface{} to match the method signatures of jwt-go and added a test (#22) 2017-10-10 06:26:11 -04:00
Peter Kieltyka
6444fb9aef Move Verifier method to pkg-level func to accept *jwtauth.JwtAuth 2017-07-06 18:09:09 -04:00
Peter Kieltyka
1e267ab0c7 Rename TokenContext method to FromContext 2017-07-06 15:23:11 -04:00
Peter Kieltyka
4c654d77d5 Refactor jwtauth pkg, move to go-chi org, and support dgrijalva/jwt-go v3 2017-07-05 17:05:27 -04:00
Vojtech Vitek (V-Teq)
c97496f7ab JWT Auth for go1.7 2016-07-11 17:51:29 -04:00
Hafiz Ismail
293f48cc84 Fixed an issue with panic error when token supplied was signed with a different
`alg` method than expected

```
	...
	token, err := ja.Decode(tokenStr)
	if err != nil || !token.Valid || token.Method != ja.signer {
		switch err.Error() { ... } // panic when `err == nil` but `token.Method != ja.signer`
		...
	}

```

Added test to cover this case.
2016-02-03 19:53:31 +08:00
Peter Kieltyka
b2ccd8612d Test status code in tests 2016-01-21 14:19:49 -05:00
Peter Kieltyka
2d088c1f3a Chi can chain middleware in one line, #fancy 2016-01-21 14:12:19 -05:00
Peter Kieltyka
4c4d95448b Use test secret 2016-01-21 14:09:44 -05:00
Peter Kieltyka
5230a789a2 Remove debug statements 2016-01-21 14:08:52 -05:00
Peter Kieltyka
a872c75843 Handler improvements, Claims type, expiry and tests 2016-01-21 14:00:36 -05:00