Browse Source

replace jwt library

Fixes #1762
tags/v2.8.0-rc1
Shivaram Lingamneni 2 years ago
parent
commit
ef92318282

+ 1
- 5
go.mod View File

@@ -5,23 +5,19 @@ go 1.16
5 5
 require (
6 6
 	code.cloudfoundry.org/bytefmt v0.0.0-20200131002437-cf55d5288a48
7 7
 	github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962
8
-	github.com/dgrijalva/jwt-go v3.2.0+incompatible
9 8
 	github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815
10 9
 	github.com/ergochat/confusables v0.0.0-20201108231250-4ab98ab61fb1
11 10
 	github.com/ergochat/go-ident v0.0.0-20200511222032-830550b1d775
12 11
 	github.com/ergochat/irc-go v0.0.0-20210617222258-256f1601d3ce
13 12
 	github.com/go-sql-driver/mysql v1.6.0
14 13
 	github.com/go-test/deep v1.0.6 // indirect
14
+	github.com/golang-jwt/jwt v3.2.1+incompatible
15 15
 	github.com/gorilla/websocket v1.4.2
16
-	github.com/goshuirc/irc-go v0.0.0-20210318074529-bdc2c2cd2fef // indirect
17 16
 	github.com/okzk/sdnotify v0.0.0-20180710141335-d9becc38acbd
18 17
 	github.com/onsi/ginkgo v1.12.0 // indirect
19 18
 	github.com/onsi/gomega v1.9.0 // indirect
20
-	github.com/oragono/confusables v0.0.0-20201108231250-4ab98ab61fb1 // indirect
21
-	github.com/oragono/go-ident v0.0.0-20200511222032-830550b1d775 // indirect
22 19
 	github.com/stretchr/testify v1.4.0 // indirect
23 20
 	github.com/tidwall/buntdb v1.2.3
24
-	github.com/tidwall/rtree v0.0.0-20201027154624-32188eeb08a8 // indirect
25 21
 	github.com/toorop/go-dkim v0.0.0-20201103131630-e1cd1a0a5208
26 22
 	golang.org/x/crypto v0.0.0-20210415154028-4f45737414dc
27 23
 	golang.org/x/text v0.3.6

+ 4
- 75
go.sum View File

@@ -1,12 +1,9 @@
1 1
 code.cloudfoundry.org/bytefmt v0.0.0-20200131002437-cf55d5288a48 h1:/EMHruHCFXR9xClkGV/t0rmHrdhX4+trQUcBqjwc9xE=
2 2
 code.cloudfoundry.org/bytefmt v0.0.0-20200131002437-cf55d5288a48/go.mod h1:wN/zk7mhREp/oviagqUXY3EwuHhWyOvAdsn5Y4CzOrc=
3
-github.com/DanielOaks/go-idn v0.0.0-20160120021903-76db0e10dc65/go.mod h1:GYIaL2hleNQvfMUBTes1Zd/lDTyI/p2hv3kYB4jssyU=
4 3
 github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962 h1:KeNholpO2xKjgaaSyd+DyQRrsQjhbSeS7qe4nEw8aQw=
5 4
 github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962/go.mod h1:kC29dT1vFpj7py2OvG1khBdQpo3kInWP+6QipLbdngo=
6 5
 github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
7 6
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
8
-github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
9
-github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
10 7
 github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815 h1:bWDMxwH3px2JBh6AyO7hdCn/PkvCZXii8TGj7sbtEbQ=
11 8
 github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
12 9
 github.com/ergochat/confusables v0.0.0-20201108231250-4ab98ab61fb1 h1:WLHTOodthVyv5NvYLIvWl112kSFv5IInKKrRN2qpons=
@@ -17,45 +14,14 @@ github.com/ergochat/irc-go v0.0.0-20210617222258-256f1601d3ce h1:RfyjeynouKZjmnN
17 14
 github.com/ergochat/irc-go v0.0.0-20210617222258-256f1601d3ce/go.mod h1:2vi7KNpIPWnReB5hmLpl92eMywQvuIeIIGdt/FQCph0=
18 15
 github.com/ergochat/websocket v1.4.2-oragono1 h1:plMUunFBM6UoSCIYCKKclTdy/TkkHfUslhOfJQzfueM=
19 16
 github.com/ergochat/websocket v1.4.2-oragono1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
20
-github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
21 17
 github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
22
-github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs=
23
-github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
24 18
 github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
25 19
 github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
26 20
 github.com/go-test/deep v1.0.6 h1:UHSEyLZUwX9Qoi99vVwvewiMC8mM2bf7XEM2nqvzEn8=
27 21
 github.com/go-test/deep v1.0.6/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8=
28
-github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
22
+github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c=
23
+github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
29 24
 github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
30
-github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
31
-github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
32
-github.com/goshuirc/eventmgr v0.0.0-20170615162049-060479027c93/go.mod h1:bjJFM4iZJWTf9Rka9sNuI3GxszJqFeu5r1r15ZVtemo=
33
-github.com/goshuirc/irc-go v0.0.0-20201116034710-7e7b0985c4b5 h1:oqOT5hi8MRDGvfu4h7rlsrtper7I/0A41K0GppmBb5w=
34
-github.com/goshuirc/irc-go v0.0.0-20201116034710-7e7b0985c4b5/go.mod h1:q/JhvvKLmif3y9q8MDQM+gRCnjEKnu5ClF298TTXJug=
35
-github.com/goshuirc/irc-go v0.0.0-20201118022549-7209d10d54a8 h1:7vZqkY9bwimFNuLhWAzdxM9IM7ym853YLNhWsKAnsrQ=
36
-github.com/goshuirc/irc-go v0.0.0-20201118022549-7209d10d54a8/go.mod h1:q/JhvvKLmif3y9q8MDQM+gRCnjEKnu5ClF298TTXJug=
37
-github.com/goshuirc/irc-go v0.0.0-20201228002532-4e36cb3f41f1 h1:Kyyey3K8nhx60lt4xish6NzLqButwqAwDb62UOU3GbE=
38
-github.com/goshuirc/irc-go v0.0.0-20201228002532-4e36cb3f41f1/go.mod h1:q/JhvvKLmif3y9q8MDQM+gRCnjEKnu5ClF298TTXJug=
39
-github.com/goshuirc/irc-go v0.0.0-20210108124156-ec778d0252a5 h1:TXGvyYHJEBluqwI8d0V5/QmSnNxEYIMbfPE36B8CNK8=
40
-github.com/goshuirc/irc-go v0.0.0-20210108124156-ec778d0252a5/go.mod h1:q/JhvvKLmif3y9q8MDQM+gRCnjEKnu5ClF298TTXJug=
41
-github.com/goshuirc/irc-go v0.0.0-20210214005848-fcaabd19f360 h1:ChbmWPZwyfgsZd6zxw7B/4hWJE7ezmb69PezUM9+YA4=
42
-github.com/goshuirc/irc-go v0.0.0-20210214005848-fcaabd19f360/go.mod h1:q/JhvvKLmif3y9q8MDQM+gRCnjEKnu5ClF298TTXJug=
43
-github.com/goshuirc/irc-go v0.0.0-20210214015142-9d703e6ac38a h1:PR1tw21nn93AwKmjEPA7IVHiT+ld9qgO1H32APCMvL0=
44
-github.com/goshuirc/irc-go v0.0.0-20210214015142-9d703e6ac38a/go.mod h1:q/JhvvKLmif3y9q8MDQM+gRCnjEKnu5ClF298TTXJug=
45
-github.com/goshuirc/irc-go v0.0.0-20210215162435-14cd697c0c8c h1:pOTMO5A1nszuxNyKieZa3owgDqCpN1OhOGbBg8EuLzk=
46
-github.com/goshuirc/irc-go v0.0.0-20210215162435-14cd697c0c8c/go.mod h1:q/JhvvKLmif3y9q8MDQM+gRCnjEKnu5ClF298TTXJug=
47
-github.com/goshuirc/irc-go v0.0.0-20210222010959-6e139f6c42e9 h1:A1mSQ0N5Kx8i+aeqeQ0VLbq3swuH0R/JoQcFcR9yUWA=
48
-github.com/goshuirc/irc-go v0.0.0-20210222010959-6e139f6c42e9/go.mod h1:q/JhvvKLmif3y9q8MDQM+gRCnjEKnu5ClF298TTXJug=
49
-github.com/goshuirc/irc-go v0.0.0-20210223005429-8d38e43fc6ed h1:cwwqHrmLafgEucSMC9PmFOA671dc4bEZ5z6FsamnBY8=
50
-github.com/goshuirc/irc-go v0.0.0-20210223005429-8d38e43fc6ed/go.mod h1:q/JhvvKLmif3y9q8MDQM+gRCnjEKnu5ClF298TTXJug=
51
-github.com/goshuirc/irc-go v0.0.0-20210301225436-2c4b83d64847 h1:MmsZRpAsMxyw0P5/SFn2L6edhmIXRlolgXvOF+fgEiQ=
52
-github.com/goshuirc/irc-go v0.0.0-20210301225436-2c4b83d64847/go.mod h1:q/JhvvKLmif3y9q8MDQM+gRCnjEKnu5ClF298TTXJug=
53
-github.com/goshuirc/irc-go v0.0.0-20210304031553-cf78e9176f96 h1:sihI3HsrJWyS4MtBmxh5W4gDZD34SWodkWyUvJltswY=
54
-github.com/goshuirc/irc-go v0.0.0-20210304031553-cf78e9176f96/go.mod h1:q/JhvvKLmif3y9q8MDQM+gRCnjEKnu5ClF298TTXJug=
55
-github.com/goshuirc/irc-go v0.0.0-20210311004346-ea7a188a73fe h1:5UsPgeXJBkFgJK3Ml0nj6ljasjd26xiUxALnDJHmipE=
56
-github.com/goshuirc/irc-go v0.0.0-20210311004346-ea7a188a73fe/go.mod h1:q/JhvvKLmif3y9q8MDQM+gRCnjEKnu5ClF298TTXJug=
57
-github.com/goshuirc/irc-go v0.0.0-20210318074529-bdc2c2cd2fef h1:07e6GcSuNh1BoZJigrvaJSpe2PsYJgkYETOuGKpM2co=
58
-github.com/goshuirc/irc-go v0.0.0-20210318074529-bdc2c2cd2fef/go.mod h1:q/JhvvKLmif3y9q8MDQM+gRCnjEKnu5ClF298TTXJug=
59 25
 github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
60 26
 github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
61 27
 github.com/okzk/sdnotify v0.0.0-20180710141335-d9becc38acbd h1:+iAPaTbi1gZpcpDwe/BW1fx7Xoesv69hLNGPheoyhBs=
@@ -66,80 +32,45 @@ github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0
66 32
 github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
67 33
 github.com/onsi/gomega v1.9.0 h1:R1uwffexN6Pr340GtYRIdZmAiN4J+iw6WG4wog1DUXg=
68 34
 github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
69
-github.com/oragono/confusables v0.0.0-20201108231250-4ab98ab61fb1 h1:Y87UllAzZJfDbiHTEo9TEiw+YxoW++tGFkkd0Nndkjc=
70
-github.com/oragono/confusables v0.0.0-20201108231250-4ab98ab61fb1/go.mod h1:+uesPRay9e5tW6zhw4CJkRV3QOEbbZIJcsuo9ZnC+hE=
71
-github.com/oragono/go-ident v0.0.0-20200511222032-830550b1d775 h1:AMAsAn/i4AgsmWQYdMoze9omwtHpbxrKuT+AT1LmhtI=
72
-github.com/oragono/go-ident v0.0.0-20200511222032-830550b1d775/go.mod h1:r5Fk840a4eu3ii1kxGDNSJupQu9Z1UC1nfJOZZXC24c=
73
-github.com/oragono/websocket v1.4.2-oragono1 h1:YcbddwFMNDTK+1pQfLq/HIvKe5NPLgl8NFefQUPJZCA=
74
-github.com/oragono/websocket v1.4.2-oragono1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
75 35
 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
76 36
 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
77 37
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
78 38
 github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
79 39
 github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
80
-github.com/tidwall/btree v0.2.2 h1:VVo0JW/tdidNdQzNsDR4wMbL3heaxA1DGleyzQ3/niY=
81
-github.com/tidwall/btree v0.2.2/go.mod h1:huei1BkDWJ3/sLXmO+bsCNELL+Bp2Kks9OLyQFkzvA8=
82 40
 github.com/tidwall/btree v0.4.2 h1:aLwwJlG+InuFzdAPuBf9YCAR1LvSQ9zhC5aorFPlIPs=
83 41
 github.com/tidwall/btree v0.4.2/go.mod h1:huei1BkDWJ3/sLXmO+bsCNELL+Bp2Kks9OLyQFkzvA8=
84
-github.com/tidwall/buntdb v1.1.4 h1:W7y9+2dM3GOswU0t3pz6+BcwZXjj/tVOhPcO6EHufME=
85
-github.com/tidwall/buntdb v1.1.4/go.mod h1:06+/n7EFf6uUaIG5r9xZcExYN3H0Lnc+g/Kqx0fZFkI=
86 42
 github.com/tidwall/buntdb v1.2.3 h1:AoGVe4yrhKmnEPHrPrW5EUOATHOCIk4VtFvd8xn/ZtU=
87 43
 github.com/tidwall/buntdb v1.2.3/go.mod h1:+i/gBwYOHWG19wLgwMXFLkl00twh9+VWkkaOhuNQ4PA=
88
-github.com/tidwall/gjson v1.6.1 h1:LRbvNuNuvAiISWg6gxLEFuCe72UKy5hDqhxW/8183ws=
89
-github.com/tidwall/gjson v1.6.1/go.mod h1:BaHyNc5bjzYkPqgLq7mdVzeiRtULKULXLgZFKsxEHI0=
90 44
 github.com/tidwall/gjson v1.7.4 h1:19cchw8FOxkG5mdLRkGf9jqIqEyqdZhPqW60XfyFxk8=
91 45
 github.com/tidwall/gjson v1.7.4/go.mod h1:5/xDoumyyDNerp2U36lyolv46b3uF/9Bu6OfyQ9GImk=
92
-github.com/tidwall/grect v0.0.0-20161006141115-ba9a043346eb h1:5NSYaAdrnblKByzd7XByQEJVT8+9v0W/tIY0Oo4OwrE=
93
-github.com/tidwall/grect v0.0.0-20161006141115-ba9a043346eb/go.mod h1:lKYYLFIr9OIgdgrtgkZ9zgRxRdvPYsExnYBsEAd8W5M=
94 46
 github.com/tidwall/grect v0.1.1 h1:+kMEkxhoqB7rniVXzMEIA66XwU07STgINqxh+qVIndY=
95 47
 github.com/tidwall/grect v0.1.1/go.mod h1:CzvbGiFbWUwiJ1JohXLb28McpyBsI00TK9Y6pDWLGRQ=
48
+github.com/tidwall/lotsa v1.0.2 h1:dNVBH5MErdaQ/xd9s769R31/n2dXavsQ0Yf4TMEHHw8=
96 49
 github.com/tidwall/lotsa v1.0.2/go.mod h1:X6NiU+4yHA3fE3Puvpnn1XMDrFZrE9JO2/w+UMuqgR8=
97
-github.com/tidwall/match v1.0.1 h1:PnKP62LPNxHKTwvHHZZzdOAOCtsJTjo6dZLCwpKm5xc=
98
-github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E=
99 50
 github.com/tidwall/match v1.0.3 h1:FQUVvBImDutD8wJLN6c5eMzWtjgONK9MwIBCOrUJKeE=
100 51
 github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
101
-github.com/tidwall/pretty v1.0.2 h1:Z7S3cePv9Jwm1KwS0513MRaoUe3S01WPbLNV40pwWZU=
102
-github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
103 52
 github.com/tidwall/pretty v1.1.0 h1:K3hMW5epkdAVwibsQEfR/7Zj0Qgt4DxtNumTq/VloO8=
104 53
 github.com/tidwall/pretty v1.1.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
105 54
 github.com/tidwall/rtred v0.1.2 h1:exmoQtOLvDoO8ud++6LwVsAMTu0KPzLTUrMln8u1yu8=
106 55
 github.com/tidwall/rtred v0.1.2/go.mod h1:hd69WNXQ5RP9vHd7dqekAz+RIdtfBogmglkZSRxCHFQ=
107
-github.com/tidwall/rtree v0.0.0-20201027154624-32188eeb08a8 h1:BsKSRhu0TDB6Snq8SutN9KQHc6vqHEXJTcAFwyGNius=
108
-github.com/tidwall/rtree v0.0.0-20201027154624-32188eeb08a8/go.mod h1:/h+UnNGt0IhNNJLkGikcdcJqm66zGD/uJGMRxK/9+Ao=
109
-github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563 h1:Otn9S136ELckZ3KKDyCkxapfufrqDqwmGjcHfAyXRrE=
110
-github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563/go.mod h1:mLqSmt7Dv/CNneF2wfcChfN1rvapyQr01LGKnKex0DQ=
111 56
 github.com/tidwall/tinyqueue v0.1.1 h1:SpNEvEggbpyN5DIReaJ2/1ndroY8iyEGxPYxoSaymYE=
112 57
 github.com/tidwall/tinyqueue v0.1.1/go.mod h1:O/QNHwrnjqr6IHItYrzoHAKYhBkLI67Q096fQP5zMYw=
113 58
 github.com/toorop/go-dkim v0.0.0-20201103131630-e1cd1a0a5208 h1:PM5hJF7HVfNWmCjMdEfbuOBNXSVF2cMFGgQTPdKCbwM=
114 59
 github.com/toorop/go-dkim v0.0.0-20201103131630-e1cd1a0a5208/go.mod h1:BzWtXXrXzZUvMacR0oF/fbDDgUPO8L36tDMmRAf14ns=
115
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
116
-golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E=
117
-golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
118 60
 golang.org/x/crypto v0.0.0-20210415154028-4f45737414dc h1:+q90ECDSAQirdykUN6sPEiBXBsp8Csjcca8Oy7bgLTA=
119 61
 golang.org/x/crypto v0.0.0-20210415154028-4f45737414dc/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
120 62
 golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
121
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
122
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
63
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw=
123 64
 golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
124
-golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
125 65
 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
126 66
 golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
127
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
128
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
129
-golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e h1:N7DeIrjYszNmSW409R3frPPwglRwMkXSBzwVbkOjLLA=
130 67
 golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
131
-golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf h1:kt3wY1Lu5MJAnKTfoMR52Cu4gwvna4VTzNOiT8tY73s=
132
-golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
133 68
 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw=
134 69
 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
135 70
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
136 71
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
137 72
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
138
-golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
139
-golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
140 73
 golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
141
-golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=
142
-golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
143 74
 golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
144 75
 golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
145 76
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -153,7 +84,5 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep
153 84
 gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
154 85
 gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
155 86
 gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
156
-gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
157
-gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
158 87
 gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
159 88
 gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=

+ 1
- 1
irc/jwt/extjwt.go View File

@@ -13,7 +13,7 @@ import (
13 13
 	"os"
14 14
 	"time"
15 15
 
16
-	"github.com/dgrijalva/jwt-go"
16
+	"github.com/golang-jwt/jwt"
17 17
 )
18 18
 
19 19
 var (

+ 0
- 97
vendor/github.com/dgrijalva/jwt-go/MIGRATION_GUIDE.md View File

@@ -1,97 +0,0 @@
1
-## Migration Guide from v2 -> v3
2
-
3
-Version 3 adds several new, frequently requested features.  To do so, it introduces a few breaking changes.  We've worked to keep these as minimal as possible.  This guide explains the breaking changes and how you can quickly update your code.
4
-
5
-### `Token.Claims` is now an interface type
6
-
7
-The most requested feature from the 2.0 verison of this library was the ability to provide a custom type to the JSON parser for claims. This was implemented by introducing a new interface, `Claims`, to replace `map[string]interface{}`.  We also included two concrete implementations of `Claims`: `MapClaims` and `StandardClaims`.
8
-
9
-`MapClaims` is an alias for `map[string]interface{}` with built in validation behavior.  It is the default claims type when using `Parse`.  The usage is unchanged except you must type cast the claims property.
10
-
11
-The old example for parsing a token looked like this..
12
-
13
-```go
14
-	if token, err := jwt.Parse(tokenString, keyLookupFunc); err == nil {
15
-		fmt.Printf("Token for user %v expires %v", token.Claims["user"], token.Claims["exp"])
16
-	}
17
-```
18
-
19
-is now directly mapped to...
20
-
21
-```go
22
-	if token, err := jwt.Parse(tokenString, keyLookupFunc); err == nil {
23
-		claims := token.Claims.(jwt.MapClaims)
24
-		fmt.Printf("Token for user %v expires %v", claims["user"], claims["exp"])
25
-	}
26
-```
27
-
28
-`StandardClaims` is designed to be embedded in your custom type.  You can supply a custom claims type with the new `ParseWithClaims` function.  Here's an example of using a custom claims type.
29
-
30
-```go
31
-	type MyCustomClaims struct {
32
-		User string
33
-		*StandardClaims
34
-	}
35
-	
36
-	if token, err := jwt.ParseWithClaims(tokenString, &MyCustomClaims{}, keyLookupFunc); err == nil {
37
-		claims := token.Claims.(*MyCustomClaims)
38
-		fmt.Printf("Token for user %v expires %v", claims.User, claims.StandardClaims.ExpiresAt)
39
-	}
40
-```
41
-
42
-### `ParseFromRequest` has been moved
43
-
44
-To keep this library focused on the tokens without becoming overburdened with complex request processing logic, `ParseFromRequest` and its new companion `ParseFromRequestWithClaims` have been moved to a subpackage, `request`.  The method signatues have also been augmented to receive a new argument: `Extractor`.
45
-
46
-`Extractors` do the work of picking the token string out of a request.  The interface is simple and composable.
47
-
48
-This simple parsing example:
49
-
50
-```go
51
-	if token, err := jwt.ParseFromRequest(tokenString, req, keyLookupFunc); err == nil {
52
-		fmt.Printf("Token for user %v expires %v", token.Claims["user"], token.Claims["exp"])
53
-	}
54
-```
55
-
56
-is directly mapped to:
57
-
58
-```go
59
-	if token, err := request.ParseFromRequest(req, request.OAuth2Extractor, keyLookupFunc); err == nil {
60
-		claims := token.Claims.(jwt.MapClaims)
61
-		fmt.Printf("Token for user %v expires %v", claims["user"], claims["exp"])
62
-	}
63
-```
64
-
65
-There are several concrete `Extractor` types provided for your convenience:
66
-
67
-* `HeaderExtractor` will search a list of headers until one contains content.
68
-* `ArgumentExtractor` will search a list of keys in request query and form arguments until one contains content.
69
-* `MultiExtractor` will try a list of `Extractors` in order until one returns content.
70
-* `AuthorizationHeaderExtractor` will look in the `Authorization` header for a `Bearer` token.
71
-* `OAuth2Extractor` searches the places an OAuth2 token would be specified (per the spec): `Authorization` header and `access_token` argument
72
-* `PostExtractionFilter` wraps an `Extractor`, allowing you to process the content before it's parsed.  A simple example is stripping the `Bearer ` text from a header
73
-
74
-
75
-### RSA signing methods no longer accept `[]byte` keys
76
-
77
-Due to a [critical vulnerability](https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/), we've decided the convenience of accepting `[]byte` instead of `rsa.PublicKey` or `rsa.PrivateKey` isn't worth the risk of misuse.
78
-
79
-To replace this behavior, we've added two helper methods: `ParseRSAPrivateKeyFromPEM(key []byte) (*rsa.PrivateKey, error)` and `ParseRSAPublicKeyFromPEM(key []byte) (*rsa.PublicKey, error)`.  These are just simple helpers for unpacking PEM encoded PKCS1 and PKCS8 keys. If your keys are encoded any other way, all you need to do is convert them to the `crypto/rsa` package's types.
80
-
81
-```go 
82
-	func keyLookupFunc(*Token) (interface{}, error) {
83
-		// Don't forget to validate the alg is what you expect:
84
-		if _, ok := token.Method.(*jwt.SigningMethodRSA); !ok {
85
-			return nil, fmt.Errorf("Unexpected signing method: %v", token.Header["alg"])
86
-		}
87
-		
88
-		// Look up key 
89
-		key, err := lookupPublicKey(token.Header["kid"])
90
-		if err != nil {
91
-			return nil, err
92
-		}
93
-		
94
-		// Unpack key from PEM encoded PKCS8
95
-		return jwt.ParseRSAPublicKeyFromPEM(key)
96
-	}
97
-```

vendor/github.com/dgrijalva/jwt-go/.gitignore → vendor/github.com/golang-jwt/jwt/.gitignore View File

@@ -1,4 +1,4 @@
1 1
 .DS_Store
2 2
 bin
3
-
3
+.idea/
4 4
 

vendor/github.com/dgrijalva/jwt-go/.travis.yml → vendor/github.com/golang-jwt/jwt/.travis.yml View File

@@ -5,9 +5,7 @@ script:
5 5
     - go test -v ./...
6 6
 
7 7
 go:
8
-  - 1.3
9
-  - 1.4
10
-  - 1.5
11
-  - 1.6
12 8
   - 1.7
13
-  - tip
9
+  - 1.8
10
+  - 1.9
11
+  - 1.10

vendor/github.com/dgrijalva/jwt-go/LICENSE → vendor/github.com/golang-jwt/jwt/LICENSE View File

@@ -1,4 +1,5 @@
1 1
 Copyright (c) 2012 Dave Grijalva
2
+Copyright (c) 2021 golang-jwt maintainers
2 3
 
3 4
 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 5
 

+ 22
- 0
vendor/github.com/golang-jwt/jwt/MIGRATION_GUIDE.md View File

@@ -0,0 +1,22 @@
1
+## Migration Guide (v3.2.1)
2
+
3
+Starting from [v3.2.1](https://github.com/golang-jwt/jwt/releases/tag/v3.2.1]), the import path has changed from `github.com/dgrijalva/jwt-go` to `github.com/golang-jwt/jwt`. Future releases will be using the `github.com/golang-jwt/jwt` import path and continue the existing versioning scheme of `v3.x.x+incompatible`. Backwards-compatible patches and fixes will be done on the `v3` release branch, where as new build-breaking features will be developed in a `v4` release, possibly including a SIV-style import path.
4
+
5
+### go.mod replacement
6
+
7
+In a first step, the easiest way is to use `go mod edit` to issue a replacement.
8
+
9
+```
10
+go mod edit -replace github.com/dgrijalva/jwt-go=github.com/golang-jwt/jwt@v3.2.1+incompatible
11
+go mod tidy
12
+```
13
+
14
+This will still keep the old import path in your code but replace it with the new package and also introduce a new indirect dependency to `github.com/golang-jwt/jwt`. Try to compile your project; it should still work.
15
+
16
+### Cleanup
17
+
18
+If your code still consistently builds, you can replace all occurences of `github.com/dgrijalva/jwt-go` with `github.com/golang-jwt/jwt`, either manually or by using tools such as `sed`. Finally, the `replace` directive in the `go.mod` file can be removed.
19
+
20
+## Older releases (before v3.2.0)
21
+
22
+The original migration guide for older releases can be found at https://github.com/dgrijalva/jwt-go/blob/master/MIGRATION_GUIDE.md.

vendor/github.com/dgrijalva/jwt-go/README.md → vendor/github.com/golang-jwt/jwt/README.md View File

@@ -1,25 +1,27 @@
1 1
 # jwt-go
2 2
 
3
-[![Build Status](https://travis-ci.org/dgrijalva/jwt-go.svg?branch=master)](https://travis-ci.org/dgrijalva/jwt-go)
4
-[![GoDoc](https://godoc.org/github.com/dgrijalva/jwt-go?status.svg)](https://godoc.org/github.com/dgrijalva/jwt-go)
3
+[![build](https://github.com/golang-jwt/jwt/actions/workflows/build.yml/badge.svg)](https://github.com/golang-jwt/jwt/actions/workflows/build.yml)
4
+[![Go Reference](https://pkg.go.dev/badge/github.com/golang-jwt/jwt.svg)](https://pkg.go.dev/github.com/golang-jwt/jwt)
5 5
 
6
-A [go](http://www.golang.org) (or 'golang' for search engine friendliness) implementation of [JSON Web Tokens](http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html)
6
+A [go](http://www.golang.org) (or 'golang' for search engine friendliness) implementation of [JSON Web Tokens](https://datatracker.ietf.org/doc/html/rfc7519).
7 7
 
8
-**NEW VERSION COMING:** There have been a lot of improvements suggested since the version 3.0.0 released in 2016. I'm working now on cutting two different releases: 3.2.0 will contain any non-breaking changes or enhancements. 4.0.0 will follow shortly which will include breaking changes. See the 4.0.0 milestone to get an idea of what's coming. If you have other ideas, or would like to participate in 4.0.0, now's the time. If you depend on this library and don't want to be interrupted, I recommend you use your dependency mangement tool to pin to version 3. 
8
+**IMPORT PATH CHANGE:** Starting from [v3.2.1](https://github.com/golang-jwt/jwt/releases/tag/v3.2.1), the import path has changed from `github.com/dgrijalva/jwt-go` to `github.com/golang-jwt/jwt`. After the original author of the library suggested migrating the maintenance of `jwt-go`, a dedicated team of open source maintainers decided to clone the existing library into this repository. See [dgrijalva/jwt-go#462](https://github.com/dgrijalva/jwt-go/issues/462) for a detailed discussion on this topic.
9 9
 
10
-**SECURITY NOTICE:** Some older versions of Go have a security issue in the cryotp/elliptic. Recommendation is to upgrade to at least 1.8.3. See issue #216 for more detail.
10
+Future releases will be using the `github.com/golang-jwt/jwt` import path and continue the existing versioning scheme of `v3.x.x+incompatible`. Backwards-compatible patches and fixes will be done on the `v3` release branch, where as new build-breaking features will be developed in a `v4` release, possibly including a SIV-style import path.
11 11
 
12
-**SECURITY NOTICE:** It's important that you [validate the `alg` presented is what you expect](https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/). This library attempts to make it easy to do the right thing by requiring key types match the expected alg, but you should take the extra step to verify it in your usage.  See the examples provided.
12
+**SECURITY NOTICE:** Some older versions of Go have a security issue in the crypto/elliptic. Recommendation is to upgrade to at least 1.8.3. See issue [dgrijalva/jwt-go#216](https://github.com/dgrijalva/jwt-go/issues/216) for more detail.
13
+
14
+**SECURITY NOTICE:** It's important that you [validate the `alg` presented is what you expect](https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/). This library attempts to make it easy to do the right thing by requiring key types match the expected alg, but you should take the extra step to verify it in your usage.  See the examples provided.
13 15
 
14 16
 ## What the heck is a JWT?
15 17
 
16 18
 JWT.io has [a great introduction](https://jwt.io/introduction) to JSON Web Tokens.
17 19
 
18
-In short, it's a signed JSON object that does something useful (for example, authentication).  It's commonly used for `Bearer` tokens in Oauth 2.  A token is made of three parts, separated by `.`'s.  The first two parts are JSON objects, that have been [base64url](http://tools.ietf.org/html/rfc4648) encoded.  The last part is the signature, encoded the same way.
20
+In short, it's a signed JSON object that does something useful (for example, authentication).  It's commonly used for `Bearer` tokens in Oauth 2.  A token is made of three parts, separated by `.`'s.  The first two parts are JSON objects, that have been [base64url](https://datatracker.ietf.org/doc/html/rfc4648) encoded.  The last part is the signature, encoded the same way.
19 21
 
20 22
 The first part is called the header.  It contains the necessary information for verifying the last part, the signature.  For example, which encryption method was used for signing and what key was used.
21 23
 
22
-The part in the middle is the interesting bit.  It's called the Claims and contains the actual stuff you care about.  Refer to [the RFC](http://self-issued.info/docs/draft-jones-json-web-token.html) for information about reserved keys and the proper way to add your own.
24
+The part in the middle is the interesting bit.  It's called the Claims and contains the actual stuff you care about.  Refer to [RFC 7519](https://datatracker.ietf.org/doc/html/rfc7519) for information about reserved keys and the proper way to add your own.
23 25
 
24 26
 ## What's in the box?
25 27
 
@@ -27,31 +29,31 @@ This library supports the parsing and verification as well as the generation and
27 29
 
28 30
 ## Examples
29 31
 
30
-See [the project documentation](https://godoc.org/github.com/dgrijalva/jwt-go) for examples of usage:
32
+See [the project documentation](https://pkg.go.dev/github.com/golang-jwt/jwt) for examples of usage:
31 33
 
32
-* [Simple example of parsing and validating a token](https://godoc.org/github.com/dgrijalva/jwt-go#example-Parse--Hmac)
33
-* [Simple example of building and signing a token](https://godoc.org/github.com/dgrijalva/jwt-go#example-New--Hmac)
34
-* [Directory of Examples](https://godoc.org/github.com/dgrijalva/jwt-go#pkg-examples)
34
+* [Simple example of parsing and validating a token](https://pkg.go.dev/github.com/golang-jwt/jwt#example-Parse-Hmac)
35
+* [Simple example of building and signing a token](https://pkg.go.dev/github.com/golang-jwt/jwt#example-New-Hmac)
36
+* [Directory of Examples](https://pkg.go.dev/github.com/golang-jwt/jwt#pkg-examples)
35 37
 
36 38
 ## Extensions
37 39
 
38 40
 This library publishes all the necessary components for adding your own signing methods.  Simply implement the `SigningMethod` interface and register a factory method using `RegisterSigningMethod`.  
39 41
 
40
-Here's an example of an extension that integrates with the Google App Engine signing tools: https://github.com/someone1/gcp-jwt-go
42
+Here's an example of an extension that integrates with multiple Google Cloud Platform signing tools (AppEngine, IAM API, Cloud KMS): https://github.com/someone1/gcp-jwt-go
41 43
 
42 44
 ## Compliance
43 45
 
44
-This library was last reviewed to comply with [RTF 7519](http://www.rfc-editor.org/info/rfc7519) dated May 2015 with a few notable differences:
46
+This library was last reviewed to comply with [RTF 7519](https://datatracker.ietf.org/doc/html/rfc7519) dated May 2015 with a few notable differences:
45 47
 
46
-* In order to protect against accidental use of [Unsecured JWTs](http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html#UnsecuredJWT), tokens using `alg=none` will only be accepted if the constant `jwt.UnsafeAllowNoneSignatureType` is provided as the key.
48
+* In order to protect against accidental use of [Unsecured JWTs](https://datatracker.ietf.org/doc/html/rfc7519#section-6), tokens using `alg=none` will only be accepted if the constant `jwt.UnsafeAllowNoneSignatureType` is provided as the key.
47 49
 
48 50
 ## Project Status & Versioning
49 51
 
50 52
 This library is considered production ready.  Feedback and feature requests are appreciated.  The API should be considered stable.  There should be very few backwards-incompatible changes outside of major version updates (and only with good reason).
51 53
 
52
-This project uses [Semantic Versioning 2.0.0](http://semver.org).  Accepted pull requests will land on `master`.  Periodically, versions will be tagged from `master`.  You can find all the releases on [the project releases page](https://github.com/dgrijalva/jwt-go/releases).
54
+This project uses [Semantic Versioning 2.0.0](http://semver.org).  Accepted pull requests will land on `main`.  Periodically, versions will be tagged from `main`.  You can find all the releases on [the project releases page](https://github.com/golang-jwt/jwt/releases).
53 55
 
54
-While we try to make it obvious when we make breaking changes, there isn't a great mechanism for pushing announcements out to users.  You may want to use this alternative package include: `gopkg.in/dgrijalva/jwt-go.v3`.  It will do the right thing WRT semantic versioning.
56
+While we try to make it obvious when we make breaking changes, there isn't a great mechanism for pushing announcements out to users.  You may want to use this alternative package include: `gopkg.in/golang-jwt/jwt.v3`.  It will do the right thing WRT semantic versioning.
55 57
 
56 58
 **BREAKING CHANGES:*** 
57 59
 * Version 3.0.0 includes _a lot_ of changes from the 2.x line, including a few that break the API.  We've tried to break as few things as possible, so there should just be a few type signature changes.  A full list of breaking changes is available in `VERSION_HISTORY.md`.  See `MIGRATION_GUIDE.md` for more information on updating your code.
@@ -79,9 +81,9 @@ Asymmetric signing methods, such as RSA, use different keys for signing and veri
79 81
 
80 82
 Each signing method expects a different object type for its signing keys. See the package documentation for details. Here are the most common ones:
81 83
 
82
-* The [HMAC signing method](https://godoc.org/github.com/dgrijalva/jwt-go#SigningMethodHMAC) (`HS256`,`HS384`,`HS512`) expect `[]byte` values for signing and validation
83
-* The [RSA signing method](https://godoc.org/github.com/dgrijalva/jwt-go#SigningMethodRSA) (`RS256`,`RS384`,`RS512`) expect `*rsa.PrivateKey` for signing and `*rsa.PublicKey` for validation
84
-* The [ECDSA signing method](https://godoc.org/github.com/dgrijalva/jwt-go#SigningMethodECDSA) (`ES256`,`ES384`,`ES512`) expect `*ecdsa.PrivateKey` for signing and `*ecdsa.PublicKey` for validation
84
+* The [HMAC signing method](https://pkg.go.dev/github.com/golang-jwt/jwt#SigningMethodHMAC) (`HS256`,`HS384`,`HS512`) expect `[]byte` values for signing and validation
85
+* The [RSA signing method](https://pkg.go.dev/github.com/golang-jwt/jwt#SigningMethodRSA) (`RS256`,`RS384`,`RS512`) expect `*rsa.PrivateKey` for signing and `*rsa.PublicKey` for validation
86
+* The [ECDSA signing method](https://pkg.go.dev/github.com/golang-jwt/jwt#SigningMethodECDSA) (`ES256`,`ES384`,`ES512`) expect `*ecdsa.PrivateKey` for signing and `*ecdsa.PublicKey` for validation
85 87
 
86 88
 ### JWT and OAuth
87 89
 
@@ -93,8 +95,12 @@ Without going too far down the rabbit hole, here's a description of the interact
93 95
 * OAuth defines several options for passing around authentication data. One popular method is called a "bearer token". A bearer token is simply a string that _should_ only be held by an authenticated user. Thus, simply presenting this token proves your identity. You can probably derive from here why a JWT might make a good bearer token.
94 96
 * Because bearer tokens are used for authentication, it's important they're kept secret. This is why transactions that use bearer tokens typically happen over SSL.
95 97
 
98
+### Troubleshooting
99
+
100
+This library uses descriptive error messages whenever possible. If you are not getting the expected result, have a look at the errors. The most common place people get stuck is providing the correct type of key to the parser. See the above section on signing methods and key types.
101
+
96 102
 ## More
97 103
 
98
-Documentation can be found [on godoc.org](http://godoc.org/github.com/dgrijalva/jwt-go).
104
+Documentation can be found [on pkg.go.dev](https://pkg.go.dev/github.com/golang-jwt/jwt).
99 105
 
100 106
 The command line utility included in this project (cmd/jwt) provides a straightforward example of token creation and parsing as well as a useful tool for debugging your own integration. You'll also find several implementation examples in the documentation.

vendor/github.com/dgrijalva/jwt-go/VERSION_HISTORY.md → vendor/github.com/golang-jwt/jwt/VERSION_HISTORY.md View File

@@ -1,5 +1,11 @@
1 1
 ## `jwt-go` Version History
2 2
 
3
+#### 3.2.1
4
+
5
+* **Import Path Change**: See MIGRATION_GUIDE.md for tips on updating your code
6
+	* Changed the import path from `github.com/dgrijalva/jwt-go` to `github.com/golang-jwt/jwt`
7
+* Fixed type confusing issue between `string` and `[]string` in `VerifyAudience` ([#12](https://github.com/golang-jwt/jwt/pull/12)). This fixes CVE-2020-26160 
8
+
3 9
 #### 3.2.0
4 10
 
5 11
 * Added method `ParseUnverified` to allow users to split up the tasks of parsing and validation
@@ -115,4 +121,4 @@ It is likely the only integration change required here will be to change `func(t
115 121
 * First versioned release
116 122
 * API stabilized
117 123
 * Supports creating, signing, parsing, and validating JWT tokens
118
-* Supports RS256 and HS256 signing methods
124
+* Supports RS256 and HS256 signing methods

vendor/github.com/dgrijalva/jwt-go/claims.go → vendor/github.com/golang-jwt/jwt/claims.go View File

@@ -35,18 +35,18 @@ func (c StandardClaims) Valid() error {
35 35
 
36 36
 	// The claims below are optional, by default, so if they are set to the
37 37
 	// default value in Go, let's not fail the verification for them.
38
-	if c.VerifyExpiresAt(now, false) == false {
38
+	if !c.VerifyExpiresAt(now, false) {
39 39
 		delta := time.Unix(now, 0).Sub(time.Unix(c.ExpiresAt, 0))
40 40
 		vErr.Inner = fmt.Errorf("token is expired by %v", delta)
41 41
 		vErr.Errors |= ValidationErrorExpired
42 42
 	}
43 43
 
44
-	if c.VerifyIssuedAt(now, false) == false {
44
+	if !c.VerifyIssuedAt(now, false) {
45 45
 		vErr.Inner = fmt.Errorf("Token used before issued")
46 46
 		vErr.Errors |= ValidationErrorIssuedAt
47 47
 	}
48 48
 
49
-	if c.VerifyNotBefore(now, false) == false {
49
+	if !c.VerifyNotBefore(now, false) {
50 50
 		vErr.Inner = fmt.Errorf("token is not valid yet")
51 51
 		vErr.Errors |= ValidationErrorNotValidYet
52 52
 	}
@@ -61,7 +61,7 @@ func (c StandardClaims) Valid() error {
61 61
 // Compares the aud claim against cmp.
62 62
 // If required is false, this method will return true if the value matches or is unset
63 63
 func (c *StandardClaims) VerifyAudience(cmp string, req bool) bool {
64
-	return verifyAud(c.Audience, cmp, req)
64
+	return verifyAud([]string{c.Audience}, cmp, req)
65 65
 }
66 66
 
67 67
 // Compares the exp claim against cmp.
@@ -90,15 +90,27 @@ func (c *StandardClaims) VerifyNotBefore(cmp int64, req bool) bool {
90 90
 
91 91
 // ----- helpers
92 92
 
93
-func verifyAud(aud string, cmp string, required bool) bool {
94
-	if aud == "" {
93
+func verifyAud(aud []string, cmp string, required bool) bool {
94
+	if len(aud) == 0 {
95 95
 		return !required
96 96
 	}
97
-	if subtle.ConstantTimeCompare([]byte(aud), []byte(cmp)) != 0 {
98
-		return true
99
-	} else {
100
-		return false
97
+	// use a var here to keep constant time compare when looping over a number of claims
98
+	result := false
99
+
100
+	var stringClaims string
101
+	for _, a := range aud {
102
+		if subtle.ConstantTimeCompare([]byte(a), []byte(cmp)) != 0 {
103
+			result = true
104
+		}
105
+		stringClaims = stringClaims + a
101 106
 	}
107
+
108
+	// case where "" is sent in one or many aud claims
109
+	if len(stringClaims) == 0 {
110
+		return !required
111
+	}
112
+
113
+	return result
102 114
 }
103 115
 
104 116
 func verifyExp(exp int64, now int64, required bool) bool {

vendor/github.com/dgrijalva/jwt-go/doc.go → vendor/github.com/golang-jwt/jwt/doc.go View File


vendor/github.com/dgrijalva/jwt-go/ecdsa.go → vendor/github.com/golang-jwt/jwt/ecdsa.go View File

@@ -88,11 +88,11 @@ func (m *SigningMethodECDSA) Verify(signingString, signature string, key interfa
88 88
 	hasher.Write([]byte(signingString))
89 89
 
90 90
 	// Verify the signature
91
-	if verifystatus := ecdsa.Verify(ecdsaKey, hasher.Sum(nil), r, s); verifystatus == true {
91
+	if verifystatus := ecdsa.Verify(ecdsaKey, hasher.Sum(nil), r, s); verifystatus {
92 92
 		return nil
93
-	} else {
94
-		return ErrECDSAVerification
95 93
 	}
94
+
95
+	return ErrECDSAVerification
96 96
 }
97 97
 
98 98
 // Implements the Sign method from SigningMethod

vendor/github.com/dgrijalva/jwt-go/ecdsa_utils.go → vendor/github.com/golang-jwt/jwt/ecdsa_utils.go View File

@@ -25,7 +25,9 @@ func ParseECPrivateKeyFromPEM(key []byte) (*ecdsa.PrivateKey, error) {
25 25
 	// Parse the key
26 26
 	var parsedKey interface{}
27 27
 	if parsedKey, err = x509.ParseECPrivateKey(block.Bytes); err != nil {
28
-		return nil, err
28
+		if parsedKey, err = x509.ParsePKCS8PrivateKey(block.Bytes); err != nil {
29
+			return nil, err
30
+		}
29 31
 	}
30 32
 
31 33
 	var pkey *ecdsa.PrivateKey

vendor/github.com/dgrijalva/jwt-go/errors.go → vendor/github.com/golang-jwt/jwt/errors.go View File


vendor/github.com/dgrijalva/jwt-go/hmac.go → vendor/github.com/golang-jwt/jwt/hmac.go View File


vendor/github.com/dgrijalva/jwt-go/map_claims.go → vendor/github.com/golang-jwt/jwt/map_claims.go View File

@@ -10,10 +10,24 @@ import (
10 10
 // This is the default claims type if you don't supply one
11 11
 type MapClaims map[string]interface{}
12 12
 
13
-// Compares the aud claim against cmp.
13
+// VerifyAudience Compares the aud claim against cmp.
14 14
 // If required is false, this method will return true if the value matches or is unset
15 15
 func (m MapClaims) VerifyAudience(cmp string, req bool) bool {
16
-	aud, _ := m["aud"].(string)
16
+	var aud []string
17
+	switch v := m["aud"].(type) {
18
+	case string:
19
+		aud = append(aud, v)
20
+	case []string:
21
+		aud = v
22
+	case []interface{}:
23
+		for _, a := range v {
24
+			vs, ok := a.(string)
25
+			if !ok {
26
+				return false
27
+			}
28
+			aud = append(aud, vs)
29
+		}
30
+	}
17 31
 	return verifyAud(aud, cmp, req)
18 32
 }
19 33
 
@@ -27,7 +41,7 @@ func (m MapClaims) VerifyExpiresAt(cmp int64, req bool) bool {
27 41
 		v, _ := exp.Int64()
28 42
 		return verifyExp(v, cmp, req)
29 43
 	}
30
-	return req == false
44
+	return !req
31 45
 }
32 46
 
33 47
 // Compares the iat claim against cmp.
@@ -40,7 +54,7 @@ func (m MapClaims) VerifyIssuedAt(cmp int64, req bool) bool {
40 54
 		v, _ := iat.Int64()
41 55
 		return verifyIat(v, cmp, req)
42 56
 	}
43
-	return req == false
57
+	return !req
44 58
 }
45 59
 
46 60
 // Compares the iss claim against cmp.
@@ -60,7 +74,7 @@ func (m MapClaims) VerifyNotBefore(cmp int64, req bool) bool {
60 74
 		v, _ := nbf.Int64()
61 75
 		return verifyNbf(v, cmp, req)
62 76
 	}
63
-	return req == false
77
+	return !req
64 78
 }
65 79
 
66 80
 // Validates time based claims "exp, iat, nbf".
@@ -71,17 +85,17 @@ func (m MapClaims) Valid() error {
71 85
 	vErr := new(ValidationError)
72 86
 	now := TimeFunc().Unix()
73 87
 
74
-	if m.VerifyExpiresAt(now, false) == false {
88
+	if !m.VerifyExpiresAt(now, false) {
75 89
 		vErr.Inner = errors.New("Token is expired")
76 90
 		vErr.Errors |= ValidationErrorExpired
77 91
 	}
78 92
 
79
-	if m.VerifyIssuedAt(now, false) == false {
93
+	if !m.VerifyIssuedAt(now, false) {
80 94
 		vErr.Inner = errors.New("Token used before issued")
81 95
 		vErr.Errors |= ValidationErrorIssuedAt
82 96
 	}
83 97
 
84
-	if m.VerifyNotBefore(now, false) == false {
98
+	if !m.VerifyNotBefore(now, false) {
85 99
 		vErr.Inner = errors.New("Token is not valid yet")
86 100
 		vErr.Errors |= ValidationErrorNotValidYet
87 101
 	}

vendor/github.com/dgrijalva/jwt-go/none.go → vendor/github.com/golang-jwt/jwt/none.go View File


vendor/github.com/dgrijalva/jwt-go/parser.go → vendor/github.com/golang-jwt/jwt/parser.go View File


vendor/github.com/dgrijalva/jwt-go/rsa.go → vendor/github.com/golang-jwt/jwt/rsa.go View File


vendor/github.com/dgrijalva/jwt-go/rsa_pss.go → vendor/github.com/golang-jwt/jwt/rsa_pss.go View File

@@ -12,9 +12,14 @@ import (
12 12
 type SigningMethodRSAPSS struct {
13 13
 	*SigningMethodRSA
14 14
 	Options *rsa.PSSOptions
15
+	// VerifyOptions is optional. If set overrides Options for rsa.VerifyPPS.
16
+	// Used to accept tokens signed with rsa.PSSSaltLengthAuto, what doesn't follow
17
+	// https://tools.ietf.org/html/rfc7518#section-3.5 but was used previously.
18
+	// See https://github.com/dgrijalva/jwt-go/issues/285#issuecomment-437451244 for details.
19
+	VerifyOptions *rsa.PSSOptions
15 20
 }
16 21
 
17
-// Specific instances for RS/PS and company
22
+// Specific instances for RS/PS and company.
18 23
 var (
19 24
 	SigningMethodPS256 *SigningMethodRSAPSS
20 25
 	SigningMethodPS384 *SigningMethodRSAPSS
@@ -24,13 +29,15 @@ var (
24 29
 func init() {
25 30
 	// PS256
26 31
 	SigningMethodPS256 = &SigningMethodRSAPSS{
27
-		&SigningMethodRSA{
32
+		SigningMethodRSA: &SigningMethodRSA{
28 33
 			Name: "PS256",
29 34
 			Hash: crypto.SHA256,
30 35
 		},
31
-		&rsa.PSSOptions{
36
+		Options: &rsa.PSSOptions{
37
+			SaltLength: rsa.PSSSaltLengthEqualsHash,
38
+		},
39
+		VerifyOptions: &rsa.PSSOptions{
32 40
 			SaltLength: rsa.PSSSaltLengthAuto,
33
-			Hash:       crypto.SHA256,
34 41
 		},
35 42
 	}
36 43
 	RegisterSigningMethod(SigningMethodPS256.Alg(), func() SigningMethod {
@@ -39,13 +46,15 @@ func init() {
39 46
 
40 47
 	// PS384
41 48
 	SigningMethodPS384 = &SigningMethodRSAPSS{
42
-		&SigningMethodRSA{
49
+		SigningMethodRSA: &SigningMethodRSA{
43 50
 			Name: "PS384",
44 51
 			Hash: crypto.SHA384,
45 52
 		},
46
-		&rsa.PSSOptions{
53
+		Options: &rsa.PSSOptions{
54
+			SaltLength: rsa.PSSSaltLengthEqualsHash,
55
+		},
56
+		VerifyOptions: &rsa.PSSOptions{
47 57
 			SaltLength: rsa.PSSSaltLengthAuto,
48
-			Hash:       crypto.SHA384,
49 58
 		},
50 59
 	}
51 60
 	RegisterSigningMethod(SigningMethodPS384.Alg(), func() SigningMethod {
@@ -54,13 +63,15 @@ func init() {
54 63
 
55 64
 	// PS512
56 65
 	SigningMethodPS512 = &SigningMethodRSAPSS{
57
-		&SigningMethodRSA{
66
+		SigningMethodRSA: &SigningMethodRSA{
58 67
 			Name: "PS512",
59 68
 			Hash: crypto.SHA512,
60 69
 		},
61
-		&rsa.PSSOptions{
70
+		Options: &rsa.PSSOptions{
71
+			SaltLength: rsa.PSSSaltLengthEqualsHash,
72
+		},
73
+		VerifyOptions: &rsa.PSSOptions{
62 74
 			SaltLength: rsa.PSSSaltLengthAuto,
63
-			Hash:       crypto.SHA512,
64 75
 		},
65 76
 	}
66 77
 	RegisterSigningMethod(SigningMethodPS512.Alg(), func() SigningMethod {
@@ -94,7 +105,12 @@ func (m *SigningMethodRSAPSS) Verify(signingString, signature string, key interf
94 105
 	hasher := m.Hash.New()
95 106
 	hasher.Write([]byte(signingString))
96 107
 
97
-	return rsa.VerifyPSS(rsaKey, m.Hash, hasher.Sum(nil), sig, m.Options)
108
+	opts := m.Options
109
+	if m.VerifyOptions != nil {
110
+		opts = m.VerifyOptions
111
+	}
112
+
113
+	return rsa.VerifyPSS(rsaKey, m.Hash, hasher.Sum(nil), sig, opts)
98 114
 }
99 115
 
100 116
 // Implements the Sign method from SigningMethod

vendor/github.com/dgrijalva/jwt-go/rsa_utils.go → vendor/github.com/golang-jwt/jwt/rsa_utils.go View File

@@ -8,7 +8,7 @@ import (
8 8
 )
9 9
 
10 10
 var (
11
-	ErrKeyMustBePEMEncoded = errors.New("Invalid Key: Key must be PEM encoded PKCS1 or PKCS8 private key")
11
+	ErrKeyMustBePEMEncoded = errors.New("Invalid Key: Key must be a PEM encoded PKCS1 or PKCS8 key")
12 12
 	ErrNotRSAPrivateKey    = errors.New("Key is not a valid RSA private key")
13 13
 	ErrNotRSAPublicKey     = errors.New("Key is not a valid RSA public key")
14 14
 )

vendor/github.com/dgrijalva/jwt-go/signing_method.go → vendor/github.com/golang-jwt/jwt/signing_method.go View File


vendor/github.com/dgrijalva/jwt-go/token.go → vendor/github.com/golang-jwt/jwt/token.go View File

@@ -65,7 +65,7 @@ func (t *Token) SignedString(key interface{}) (string, error) {
65 65
 func (t *Token) SigningString() (string, error) {
66 66
 	var err error
67 67
 	parts := make([]string, 2)
68
-	for i, _ := range parts {
68
+	for i := range parts {
69 69
 		var jsonValue []byte
70 70
 		if i == 0 {
71 71
 			if jsonValue, err = json.Marshal(t.Header); err != nil {

+ 3
- 1
vendor/modules.txt View File

@@ -9,7 +9,6 @@ github.com/GehirnInc/crypt/internal
9 9
 github.com/GehirnInc/crypt/md5_crypt
10 10
 # github.com/dgrijalva/jwt-go v3.2.0+incompatible
11 11
 ## explicit
12
-github.com/dgrijalva/jwt-go
13 12
 # github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815
14 13
 ## explicit
15 14
 github.com/docopt/docopt-go
@@ -30,6 +29,9 @@ github.com/ergochat/irc-go/ircutils
30 29
 github.com/go-sql-driver/mysql
31 30
 # github.com/go-test/deep v1.0.6
32 31
 ## explicit
32
+# github.com/golang-jwt/jwt v3.2.1+incompatible
33
+## explicit
34
+github.com/golang-jwt/jwt
33 35
 # github.com/gorilla/websocket v1.4.2 => github.com/ergochat/websocket v1.4.2-oragono1
34 36
 ## explicit
35 37
 github.com/gorilla/websocket

Loading…
Cancel
Save