Open
Description
Currently we require that the supported grants be given to the constructor, ie:
var oauth = oauthserver({
grants: ['password', 'refresh_token']
});
But we also require that models implement the checkGrantTypeAllowed()
function which gives models an opportunity to reject access for a given clientId and grant_type combination.
This implies that if we have different grant_types for different clients, we need to pass all of them to the constructor, even though we'll be verifying the grant_type again in the checkGrantTypeAllowed()
function.
I propose that we remove the grants
option from the constructor.
Thoughts?