Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authenticate requests #2

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Authenticate requests #2

wants to merge 4 commits into from

Conversation

biw
Copy link
Owner

@biw biw commented Mar 17, 2021

This modification adds an authHandler options to authenticate requests.

const nuts = Nuts({
  repository: "<repo name>",
  token: "<github token>",
  authHandler: function (req, version) {
    // Return whether the requesting user has permission to retrieve this release
  }
});

authHandler must return true/false or a promise resolving to true/false.

From GitbookIO/nuts#175

@biw biw changed the title Added authentication handler Authenticate requests Mar 17, 2021
idnistrian referenced this pull request in Hirecalibre/nuts-app Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants