Skip to content

Improve grant type checking #157

Open
@nunofgs

Description

@nunofgs

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions