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

401 Unauthorized only returning #3

Closed
blandofgod opened this issue Oct 20, 2015 · 1 comment
Closed

401 Unauthorized only returning #3

blandofgod opened this issue Oct 20, 2015 · 1 comment

Comments

@blandofgod
Copy link

Good Afternoon, I have been trying to implement this capability but i am having some trouble.

The routes are located in /routes/users.js
The passport.use(new ClientCertStrategy..... is located in auth/authroization.js

I am attempting to invoke the Client-cert strategy on the user.js line:
router.use('/user', auth.authenticate('client-cert'), function(req, res, next) {

console.log('authenticated');
next();
});

But all I get is a 401 error.

In the Authorization.js i have simplified it to return a user but still nothing:

passport.use(new ClientCertStrategy(function(clientCert, done)
{
var user = "test";
done(null, user);
}
));
module.exports = passport;

anysuggestions?

@blandofgod
Copy link
Author

About 7 hours later i solved it. In fact the service was working correctly, i had some other settings improperly set.

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