Skip to content

Commit

Permalink
Fixing issue with client credentials token deletion. (#347)
Browse files Browse the repository at this point in the history
* Fixing content type.
  • Loading branch information
jeff-winn committed Nov 26, 2023
1 parent 5ced93f commit b3b261d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/clients/authenticationClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,19 @@ export class AuthenticationClientImpl implements AuthenticationClient {
}

public async logoutClientCredentialsAsync(token: OAuthToken): Promise<void> {
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);
Expand Down

0 comments on commit b3b261d

Please sign in to comment.