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

Add an authorization callback instead of (or along with) herokaiOnlyHandler #20

Open
jacobian opened this issue Feb 10, 2015 · 1 comment

Comments

@jacobian
Copy link

It'd more flexible to have an authorization callback function that decides if an authorized user is allowed (rather than the hardcoded herokaiOnlyHandler).

So for example:

app.use(bouncer({
  oAuthClientID      : 'client-id',
  oAuthClientSecret  : 'client-secret',
  encryptionSecret   : 'abcd1234abcd1234',
  authCallback: function(user) { return /@example\.com$/.test(user.email); }
}));

See also the change to heroku-bouncer-python and my PR for heroku-bouncer.

I'll try to submit a PR for this, but I'm an express n00b so it might take me a bit :)

@jacobian
Copy link
Author

Hey, I wrote some Javascript: #21

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

No branches or pull requests

1 participant