Revoke authentication rest API Bad credentials

cuba version 6.10.11

While trying to revoke authentication from the current authenticated user using rest api

Just calling oauth/token then call oauth/revoke

http://localhost:8080/app/rest/v2/oauth/token

http://localhost:8080/app/rest/v2/oauth/revoke

receiving Bad credentials although the user is already authenticated and token is received

User is granted Role that has permission only to used REST API

please advice urgently

The issue was with passing the correct value of the encoded client id and encoded password

cuba.rest.client.id =
cuba.rest.client.secret =

clientId:cleintsecret Base64 encoded

the client id and secret is not equal to the user credentials

Steps to use REST API for revoke authentication

/oauth/revoke

Request Header

Authentication value = encoded Base 64 [clientId:clientsecret]
content_type = application/x-www-form-urlencoded

Body

token = received token while calling /oauth/token or refresh token
token_type_hint = access_token or refresh_access_token [optional]

1 Like