I'm new to Yii2. I want to implement Oauth2 with Resource owner credentials grant type in Yii2.
For that, I found this Yii2 specific library:
https://github.com/Filsh/yii2-oauth2-server
But the documentation is poor and doesn't show exact steps to use it.
So far I did this:
1) Install package using composer
2) Added module configuration into common/config/main.php
Now I'm getting confused for the next steps.
It says to create a class called "PublicKeyStorage". Is it really necessary or optional step? If yes then where should I create this file? Do I need to create privkey.pem and pubkey.pem file manually? If yes there what content should they have?
Next, it says to extend the common\models\User
model. So where should I create this file? Into frontend/models?
3) Next, it says to run the package migration which is clear.
4) Next, it says to set URLs, which is also clear.
5) Next, it says to set controller, I believe it is to verify incoming token. Am I correct?
The last question I have is that what URLs should I hit to get the access token? Is it /oauth2/token
?