File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/main/kotlin/no/nav/navansatt Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
package no.nav.navansatt
2
2
3
+ import com.auth0.jwk.GuavaCachedJwkProvider
3
4
import com.auth0.jwk.UrlJwkProvider
4
5
import io.ktor.application.Application
5
6
import io.ktor.application.call
@@ -104,7 +105,7 @@ fun Application.mainModule(
104
105
install(Authentication ) {
105
106
jwt(" azure" ) {
106
107
verifier(
107
- UrlJwkProvider (URL (azureOidc.jwks_uri)),
108
+ GuavaCachedJwkProvider ( UrlJwkProvider (URL (azureOidc.jwks_uri) )),
108
109
azureOidc.issuer
109
110
) {
110
111
config.azureClientId?.also { withAudience(it) }
@@ -114,7 +115,7 @@ fun Application.mainModule(
114
115
115
116
jwt(" sts" ) {
116
117
verifier(
117
- UrlJwkProvider (URL (stsOidc.jwks_uri)),
118
+ GuavaCachedJwkProvider ( UrlJwkProvider (URL (stsOidc.jwks_uri) )),
118
119
stsOidc.issuer
119
120
)
120
121
validate { credential -> JWTPrincipal (credential.payload) }
You can’t perform that action at this time.
0 commit comments