diff --git a/common/tokenexchange/tokenprovider.go b/common/tokenexchange/tokenprovider.go index b101b6f..895e473 100644 --- a/common/tokenexchange/tokenprovider.go +++ b/common/tokenexchange/tokenprovider.go @@ -100,6 +100,7 @@ func (t TokenExchangeProvider) GetToken(ctx context.Context, scope string, parti formData := url.Values{} formData.Set("grant_type", "urn:ietf:params:oauth:grant-type:token-exchange") formData.Set("subject_token", string(content)) + formData.Set("subject_token_type", "urn:ietf:params:oauth:token-type:jwt") formData.Set("resource", participantContextID) formData.Set("scope", scope) formData.Set("audience", t.tokenExchangeAudience) diff --git a/common/tokenexchange/tokenprovider_test.go b/common/tokenexchange/tokenprovider_test.go index 84a74d4..0fd8498 100644 --- a/common/tokenexchange/tokenprovider_test.go +++ b/common/tokenexchange/tokenprovider_test.go @@ -67,6 +67,7 @@ func TestGetToken_Success(t *testing.T) { require.NoError(t, err) assert.Equal(t, "urn:ietf:params:oauth:grant-type:token-exchange", form.Get("grant_type")) assert.Equal(t, testSubjectToken, form.Get("subject_token")) + assert.Equal(t, "urn:ietf:params:oauth:token-type:jwt", form.Get("subject_token_type")) assert.Equal(t, testParticipantContext, form.Get("resource")) assert.Equal(t, testScope, form.Get("scope")) assert.Equal(t, testAudience, form.Get("audience"))