From 0113d4184f10bedc8cd2264c2c4a4c818dc3079c Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Tue, 20 Apr 2021 14:56:09 -0400 Subject: [PATCH] tokenRequest.scope can be null --- .../security/mock/oauth2/grant/ClientCredentialsGrantHandler.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/no/nav/security/mock/oauth2/grant/ClientCredentialsGrantHandler.kt b/src/main/kotlin/no/nav/security/mock/oauth2/grant/ClientCredentialsGrantHandler.kt index d03c8f85..9f9c3300 100644 --- a/src/main/kotlin/no/nav/security/mock/oauth2/grant/ClientCredentialsGrantHandler.kt +++ b/src/main/kotlin/no/nav/security/mock/oauth2/grant/ClientCredentialsGrantHandler.kt @@ -26,7 +26,7 @@ internal class ClientCredentialsGrantHandler( tokenType = "Bearer", accessToken = accessToken.serialize(), expiresIn = accessToken.expiresIn(), - scope = tokenRequest.scope.toString() + scope = tokenRequest.scope?.toString() ) } }