-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Authentication Package #155
Comments
Is it possible to bring in external auth and authz models? IMO integration with auth0 or keycloak etc... should be accomodated easily |
What bindings do we need?
// application code (user provided)
ctx.bind('authentication.strategy').to(() => {
return new Strategy(verify);
function verify(username, password, cb) {
cb(null, {username: username});
}
});
// authentication package code
ctx.bind('authentication.user').to((
@inject('authentication.strategy') strategy,
@inject('http.request') req
) => {
return Promise((resolve, reject) => {
const shimReq = createShimReq(req);
strategy.success = resolve;
strategy.fail = () => {
resolve();
}
strategy.authenticate(shimReq);
});
}); |
@kesavkolla yep... once this is complete you'll be able to use |
since decorators for individual functions are not applicable, a slight change to the bindings will be required, like from |
acceptance test from Ritchie:
|
Closes #136, closes #142, closes #150, closes #145, closes strongloop-internal/scrum-asteroid#164, closes strongloop-internal/scrum-asteroid#165, closes strongloop-internal/scrum-asteroid#166, closes #270, closes #271, closes #272, closes #273, closes #274, closes #275, closes #276
Support basic auth via pluggable Passport strategies
@authenticate
implementation @authenticate implementation #150 @siddhi @maheshtoDynamicValue
need @inject support in toDynamicValue #229controllerClass : Constructor
DO NOT MERGE: Feature/controller and op bindings #235 @mahesh@inject
support for ctor args @inject support for ctor args #142 @bajtosmethodToInvoke : string
OAuth2 Strategy support for the authentication package OAuth2 Strategy support for the authentication package #230The text was updated successfully, but these errors were encountered: