-
@rhertogh Do you have a sample implementation example of the Client Credentials grant type? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @gthaka, The sample app also includes a client with the Client Credentials. You can start it in the following way:
You should then be able to configure your client, for example in Postman: Create a new Collection with the following setting:
Click "Get New Access Token", you should now receive an access token. To test the token you can create a new GET request with the URL |
Beta Was this translation helpful? Give feedback.
Hi @gthaka,
The Client Credentials grant type is meant for so called "two-legged OAuth", in other words direct client to server authentication without any end user being involved. Is that what you're trying to achieve? And does your application currently use RBAC?
The sample app also includes a client with the Client Credentials. You can start it in the following way:
git clone https://github.com/rhertogh/yii2-oauth2-server.git
cd yii2-oauth2-server
cp .env.example .env
docker compose build
docker compose up -d