Use of this gem with Client Credentials flow
We're using Grape with Grape::OAuth2 for a Rails project which provides an API that needs to be secured by the Client Credentials flow of OAuth2.
We've been following the configuration guidelines and the 'lazy' usage example stated in the README, but we have a question regarding the resource_owner_class_name. As we are using Client Credentials we don't need a resource owner, but the documentation states that all three models must exist. We don't know if we could abstain from creating that model or if we should do something else.
We didn't include the resource owner parts in our migrations either.
Thanks for your time.
Hi @periflo90 . First of all I need to know if you are using existing gems mixins (ActiveRecord / Sequel, Mongoid?). If yes, then as far as I remember AccessToken and AccessGrant mixins has associations on resource_owner_class_name , so it must be present.
But you can just implement your own classes for tokens and just ignore resource_owner_class_name as it would be called only in corresponding OAuth flow.
Hello @nbulaj, thanks for your reply.
Yes, we are using ActiveRecord mixins.
Then I can recommend to "copy" the behavior of this mixins but without association to resource owner if you don't need it
Will do. Thank you very much!