File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -71,9 +71,9 @@ func registerWebhook(ctx context.Context) {
7171 risc := config .Subrouter (config .Get ().RISC .Webhook )
7272 risc .HandleFunc ("" , webhook ).Methods ("POST" )
7373
74- ar := jwk .NewAutoRefresh (ctx )
75- ar . Configure (googleConfig .JWKURI , jwk .WithMinRefreshInterval (time .Hour ))
76- tmp , err := ar . Refresh (ctx , googleConfig .JWKURI )
74+ c := jwk .NewCache (ctx )
75+ c . Register (googleConfig .JWKURI ) // , jwk.WithMinRefreshInterval(time.Hour))
76+ tmp , err := c . Get (ctx , googleConfig .JWKURI )
7777 if err != nil {
7878 log .Error (err )
7979 return
@@ -99,7 +99,7 @@ func registerWebhook(ctx context.Context) {
9999 case <- ctx .Done ():
100100 return
101101 case <- ticker .C :
102- tmp , err := ar . Fetch (ctx , googleConfig .JWKURI )
102+ tmp , err := c . Refresh (ctx , googleConfig .JWKURI )
103103 if err != nil {
104104 log .Error (err )
105105 return
You can’t perform that action at this time.
0 commit comments