Skip to content

Commit 79d9cdd

Browse files
committed
Github:17805 (Fix issue)
1 parent 960de21 commit 79d9cdd

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Project/Sources/Classes/OAuth2Provider.4dm

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -626,9 +626,7 @@ Function _getToken_Service() : Object
626626
$options.payload.sub:=This.tenant
627627
End if
628628

629-
$options.privateKey:=This.privateKey
630-
631-
$bearer:=$jwt.generate($options)
629+
$bearer:=$jwt.generate($options; This.privateKey)
632630

633631
$params.addQueryParameter("grant_type"; cs.Tools.me.urlEncode(This.grantType))
634632
$params.addQueryParameter("assertion"; $bearer)
@@ -645,9 +643,7 @@ Function _getToken_Service() : Object
645643
$options.payload.exp:=$options.payload.iat+3600
646644
$options.payload.sub:=This.clientId // Same as iss
647645

648-
$options.privateKey:=This.privateKey
649-
650-
$bearer:=$jwt.generate($options)
646+
$bearer:=$jwt.generate($options; This.privateKey)
651647

652648
// See documentation of https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-client-creds-grant-flow#second-case-access-token-request-with-a-certificate
653649
$params.addQueryParameter("grant_type"; This.grantType)

0 commit comments

Comments
 (0)