With the expansion of the project, a separate java service was developed, for authentication, it is required to encrypt the clientId and clientSecret in Base64 and send a request in the header. How to use this authentication method using Authclient OAuth2?

How to add something similar to the request header: Authorization: Basic YhJEioIdDkRloDRqXPcsRZfvywEdCd== ?

I looked at the documentation, but did not find anything like that, using authenticateUser() clientId and clientSecret are sent in the request body, as a result of which authorization fails.

There is no way to refuse encryption. I will be glad to any advice on how to implement this method of authorization on Yii2.

  • View authorization using headers . Should help you. - Vitaliy Shebanits
  • @ VitaliyShebanits Write a request with cURL for authorization is simple, but I hoped that Yii2 Authclient has support for sending authorization requests with the heading Authorization out of the box. - Nirax

0