Commit Graph

22 Commits

Author SHA1 Message Date
Oleksandr Redko 8aa5d6cef8
Refactor to use strings.EqualFold (#329) 2023-08-03 11:27:46 -04:00
Dcalsky 8b7470d561
perf: quick way to validate token string (#302) 2023-07-20 21:35:04 +02:00
Oleksandr Redko b2b650971a
Reformat code: add whitespaces, remove empty lines (#319) 2023-06-21 12:39:55 +02:00
Michael Fridman 15f96b0627
Add golangci-lint (#279)
* Add golangci-lint-action

* Upgrading CodeQL to v2

* Fixed linting errors

---------

Co-authored-by: Christian Banse <oxisto@aybaze.com>
2023-03-31 13:20:59 +02:00
Christian Banse 148d710109
`v5` Pre-Release (#234)
Co-authored-by: Micah Parks <66095735+MicahParks@users.noreply.github.com>
Co-authored-by: Michael Fridman <mf192@icloud.com>
2023-02-21 14:32:25 +01:00
Hugo fdaf0eb0e0
Implement a BearerExtractor (#226)
* Implement a BearerExtractor

This is a rather common extractor; it extracts the JWT from the HTTP
Authorization header, expecting it to include the "Bearer " prefix.

This patterns is rather common and this snippet is repeated in enough
applications that it's probably best to just include it upstream and
allow reusing it.

* Ignore case-sensitivity for "Bearer"
2022-08-19 13:59:36 +02:00
Stefan Tudose 0fb40d3824
use errors.Is for extractor errors (#141) 2021-12-15 12:50:05 +01:00
Sebastien Rosset fd8cd69d8e
Adjusted `parser_test.go` to include RSA and ECDSA tokens (#106) 2021-09-24 21:32:29 +02:00
Michael Fridman 2ebb50f957
Adds go module support /v4 (#41)
Additionally, added `staticcheck` for basic static code analysis (#44)

Co-authored-by: Christian Banse <oxisto@aybaze.com>
2021-08-03 15:51:01 +02:00
Sadman Sakib 6a07921e68
Enable go module support for the project (#3)
* initial go module file

Signed-off-by: sadmansakib <ssadman8@gmail.com>

* fix linting issues

Signed-off-by: sadmansakib <ssadman8@gmail.com>

* rename module to golang-jwt/jwt

Signed-off-by: sadmansakib <ssadman8@gmail.com>

* Renamed imports to match with go module name.

Signed-off-by: sadmansakib <ssadman8@gmail.com>

* update travis for latest go versions

Signed-off-by: sadmansakib <ssadman8@gmail.com>

* Set go version to 1.14

lowered the go version to make it consistent with matrix build

* revert accidental changes while renaming

Signed-off-by: sadmansakib <ssadman8@gmail.com>

* remove travis CI

no longer needed since github actions workflow was created for the
project

Signed-off-by: sadmansakib <ssadman8@gmail.com>

* Revert "remove travis CI"

This reverts commit b3ae57f710.

* update travis for older go versions
2021-05-28 21:26:41 -04:00
Dave Grijalva 6f4f904379 add options to ParseFromRequest 2018-03-08 15:04:09 -08:00
Dave Grijalva 2ed748cd9c updated documentation. moved migration guide to separate doc 2016-06-15 10:49:54 -07:00
Dave Grijalva 5eef21b7ed a few examples and some documentation cleanup 2016-06-06 17:45:30 -07:00
Dave Grijalva f93fcfd3f9 unit tests for extractor 2016-06-06 17:18:24 -07:00
Dave Grijalva de0a819d8d added documentation 2016-06-06 16:55:41 -07:00
Dave Grijalva bb45bfcdec add new interface Extractor for making token extraction pluggable 2016-06-06 15:27:44 -07:00
Dave Grijalva 5e270fa6cd changed argument order to put claims type before keyfunc. this is easier to read when keyfunc is an inline closure 2016-04-12 16:25:25 -07:00
Dave Grijalva 4400800062 Merge branch 'release_3_0_0' into dg/request 2016-04-12 14:34:54 -07:00
Dave Grijalva 070a4bdd00 moved request related error int request subpackage 2016-04-08 13:58:29 -07:00
Dave Grijalva 288cee4336 added a couple tests for request parsing that don't rely on giant parser test dataset 2016-04-08 13:02:18 -07:00
Dave Grijalva bc13ee82c3 Merge branch 'release_3_0_0' into dg/request 2016-04-08 11:57:11 -07:00
Dave Grijalva e0e3b433f5 WIP on migrating request parsing stuff 2016-01-14 14:09:27 -08:00