@@ -126,7 +126,8 @@ func TestWebSockets(t *testing.T) {
126126 authServer , err := jwks .NewServer (t )
127127 require .NoError (t , err )
128128 t .Cleanup (authServer .Close )
129- tokenDecoder , _ := authentication .NewJwksTokenDecoder (NewContextWithCancel (t ), zap .NewNop (), []authentication.JWKSConfig {toJWKSConfig (authServer .JWKSURL (), time .Second * 5 )}, true )
129+ tokenDecoder , err := authentication .NewJwksTokenDecoder (NewContextWithCancel (t ), zap .NewNop (), []authentication.JWKSConfig {toJWKSConfig (authServer .JWKSURL (), time .Second * 5 )}, true )
130+ require .NoError (t , err )
130131 authOptions := authentication.HttpHeaderAuthenticatorOptions {
131132 Name : JwksName ,
132133 TokenDecoder : tokenDecoder ,
@@ -175,7 +176,8 @@ func TestWebSockets(t *testing.T) {
175176 authServer , err := jwks .NewServer (t )
176177 require .NoError (t , err )
177178 t .Cleanup (authServer .Close )
178- tokenDecoder , _ := authentication .NewJwksTokenDecoder (NewContextWithCancel (t ), zap .NewNop (), []authentication.JWKSConfig {toJWKSConfig (authServer .JWKSURL (), time .Second * 5 )}, true )
179+ tokenDecoder , err := authentication .NewJwksTokenDecoder (NewContextWithCancel (t ), zap .NewNop (), []authentication.JWKSConfig {toJWKSConfig (authServer .JWKSURL (), time .Second * 5 )}, true )
180+ require .NoError (t , err )
179181 authOptions := authentication.HttpHeaderAuthenticatorOptions {
180182 Name : JwksName ,
181183 TokenDecoder : tokenDecoder ,
@@ -224,7 +226,8 @@ func TestWebSockets(t *testing.T) {
224226 authServer , err := jwks .NewServer (t )
225227 require .NoError (t , err )
226228 t .Cleanup (authServer .Close )
227- tokenDecoder , _ := authentication .NewJwksTokenDecoder (NewContextWithCancel (t ), zap .NewNop (), []authentication.JWKSConfig {toJWKSConfig (authServer .JWKSURL (), time .Second * 5 )}, true )
229+ tokenDecoder , err := authentication .NewJwksTokenDecoder (NewContextWithCancel (t ), zap .NewNop (), []authentication.JWKSConfig {toJWKSConfig (authServer .JWKSURL (), time .Second * 5 )}, true )
230+ require .NoError (t , err )
228231 authOptions := authentication.HttpHeaderAuthenticatorOptions {
229232 Name : JwksName ,
230233 TokenDecoder : tokenDecoder ,
@@ -283,7 +286,8 @@ func TestWebSockets(t *testing.T) {
283286 authServer , err := jwks .NewServer (t )
284287 require .NoError (t , err )
285288 t .Cleanup (authServer .Close )
286- tokenDecoder , _ := authentication .NewJwksTokenDecoder (NewContextWithCancel (t ), zap .NewNop (), []authentication.JWKSConfig {toJWKSConfig (authServer .JWKSURL (), time .Second * 5 )}, true )
289+ tokenDecoder , err := authentication .NewJwksTokenDecoder (NewContextWithCancel (t ), zap .NewNop (), []authentication.JWKSConfig {toJWKSConfig (authServer .JWKSURL (), time .Second * 5 )}, true )
290+ require .NoError (t , err )
287291 authOptions := authentication.HttpHeaderAuthenticatorOptions {
288292 Name : JwksName ,
289293 TokenDecoder : tokenDecoder ,
@@ -341,7 +345,8 @@ func TestWebSockets(t *testing.T) {
341345 authServer , err := jwks .NewServer (t )
342346 require .NoError (t , err )
343347 t .Cleanup (authServer .Close )
344- tokenDecoder , _ := authentication .NewJwksTokenDecoder (NewContextWithCancel (t ), zap .NewNop (), []authentication.JWKSConfig {toJWKSConfig (authServer .JWKSURL (), time .Second * 5 )}, true )
348+ tokenDecoder , err := authentication .NewJwksTokenDecoder (NewContextWithCancel (t ), zap .NewNop (), []authentication.JWKSConfig {toJWKSConfig (authServer .JWKSURL (), time .Second * 5 )}, true )
349+ require .NoError (t , err )
345350 authOptions := authentication.WebsocketInitialPayloadAuthenticatorOptions {
346351 TokenDecoder : tokenDecoder ,
347352 Key : "Authorization" ,
@@ -403,7 +408,8 @@ func TestWebSockets(t *testing.T) {
403408 authServer , err := jwks .NewServer (t )
404409 require .NoError (t , err )
405410 t .Cleanup (authServer .Close )
406- tokenDecoder , _ := authentication .NewJwksTokenDecoder (NewContextWithCancel (t ), zap .NewNop (), []authentication.JWKSConfig {toJWKSConfig (authServer .JWKSURL (), time .Second * 5 )}, true )
411+ tokenDecoder , err := authentication .NewJwksTokenDecoder (NewContextWithCancel (t ), zap .NewNop (), []authentication.JWKSConfig {toJWKSConfig (authServer .JWKSURL (), time .Second * 5 )}, true )
412+ require .NoError (t , err )
407413 authOptions := authentication.WebsocketInitialPayloadAuthenticatorOptions {
408414 TokenDecoder : tokenDecoder ,
409415 Key : "Authorization" ,
@@ -452,7 +458,8 @@ func TestWebSockets(t *testing.T) {
452458 authServer , err := jwks .NewServer (t )
453459 require .NoError (t , err )
454460 t .Cleanup (authServer .Close )
455- tokenDecoder , _ := authentication .NewJwksTokenDecoder (NewContextWithCancel (t ), zap .NewNop (), []authentication.JWKSConfig {toJWKSConfig (authServer .JWKSURL (), time .Second * 5 )}, true )
461+ tokenDecoder , err := authentication .NewJwksTokenDecoder (NewContextWithCancel (t ), zap .NewNop (), []authentication.JWKSConfig {toJWKSConfig (authServer .JWKSURL (), time .Second * 5 )}, true )
462+ require .NoError (t , err )
456463 authOptions := authentication.WebsocketInitialPayloadAuthenticatorOptions {
457464 TokenDecoder : tokenDecoder ,
458465 Key : "Authorization" ,
@@ -853,7 +860,8 @@ func TestWebSockets(t *testing.T) {
853860 authServer , err := jwks .NewServer (t )
854861 require .NoError (t , err )
855862 t .Cleanup (authServer .Close )
856- tokenDecoder , _ := authentication .NewJwksTokenDecoder (NewContextWithCancel (t ), zap .NewNop (), []authentication.JWKSConfig {toJWKSConfig (authServer .JWKSURL (), time .Second * 5 )}, true )
863+ tokenDecoder , err := authentication .NewJwksTokenDecoder (NewContextWithCancel (t ), zap .NewNop (), []authentication.JWKSConfig {toJWKSConfig (authServer .JWKSURL (), time .Second * 5 )}, true )
864+ require .NoError (t , err )
857865 authOptions := authentication.HttpHeaderAuthenticatorOptions {
858866 Name : JwksName ,
859867 TokenDecoder : tokenDecoder ,
0 commit comments