diff --git a/src/clients/authenticationClient.ts b/src/clients/authenticationClient.ts index e5fd8361..49ab2822 100644 --- a/src/clients/authenticationClient.ts +++ b/src/clients/authenticationClient.ts @@ -125,18 +125,19 @@ export class AuthenticationClientImpl implements AuthenticationClient { } public async logoutClientCredentialsAsync(token: OAuthToken): Promise { - const req = { + const body = this.encode({ token: token.access_token - }; + }); const response = await this.fetch.execute(this.baseUrl + '/oauth2/revoke', { method: 'POST', headers: { 'Authorization': `Bearer ${token.access_token}`, 'Authorization-Provider': token.provider, + 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', 'X-Application-Id': PLUGIN_ID }, - body: JSON.stringify(req) + body: body }); this.throwIfNotAuthorized(response);