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

Implement Auth Handler #16

Open
nfloersch opened this issue Feb 23, 2021 · 0 comments
Open

Implement Auth Handler #16

nfloersch opened this issue Feb 23, 2021 · 0 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@nfloersch
Copy link
Contributor

Our API will need an authentication capability.

This is defined partly with Swagger, and partly in the Node/Restify code.

In the index.js file there is a section now for the auth handlers.

var config = {
  appRoot: __dirname, // required config
  swaggerSecurityHandlers: {
  	appid: function appidSecurityHandler(req, authOrSecDef, scopesOrApiKey, cb) {
  		cb();
  	}
  }
};

More information about defining the security handler can be found here:
https://github.com/swagger-api/swagger-node/blob/master/docs/release-notes.md
and here
swagger-api/swagger-node#228

For the first iteration just enabling the API to accept an incoming authentication token, and verify it ... even if we just have a hardcode token value... that would be fine.

Then we can hook up the token management to whatever we want - the database, an OAuth service like Facebook or GitHub, etc.

@nfloersch nfloersch added the help wanted Extra attention is needed label Feb 23, 2021
@iamyume iamyume self-assigned this Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants