What does “.Strategy” do in Node or Passport?
up vote
0
down vote
favorite
What does ".Strategy" do here? Is it Node? Is it Passport?
var LocalStrategy = require('passport-local').Strategy;
Everything up to '.Strategy' part I understand. I just want to know what '.Strategy' does. I have checked the documentation on passport-local module on npm. I have also checked Passport's documentation, and it is just used in code snippets. No explanation is provided.
I am working with the MEAN stack and we are using Passport to authenticate users.
node.js passport.js mean-stack
|
show 2 more comments
up vote
0
down vote
favorite
What does ".Strategy" do here? Is it Node? Is it Passport?
var LocalStrategy = require('passport-local').Strategy;
Everything up to '.Strategy' part I understand. I just want to know what '.Strategy' does. I have checked the documentation on passport-local module on npm. I have also checked Passport's documentation, and it is just used in code snippets. No explanation is provided.
I am working with the MEAN stack and we are using Passport to authenticate users.
node.js passport.js mean-stack
Did you look at npmjs.com/package/passport-local? Search for "passport strategy"? I seem to be finding a fair bit of documentation.
– jonrsharpe
Nov 10 at 18:08
Yeah, that's the first place I looked. It doesn't exactly tell me what ".Strategy" does though. Everything leading up to the ".Strategy" part I understand.
– UhHuhOkSure
Nov 10 at 18:13
What do you mean what it does? You can see the implementation, it's open source. Or look at the abstract version: github.com/jaredhanson/passport-strategy
– jonrsharpe
Nov 10 at 18:16
I didn't know to look in the local strategy source code because there wasn't anything in the documentation about it. As far as I could tell, it could have been a Node thing or a Passport thing.
– UhHuhOkSure
Nov 10 at 18:31
But you can see where it's coming from when you require it, what other information would you need to find it? You can see in the index file it comes from strategy.js, which seems logical.
– jonrsharpe
Nov 10 at 18:32
|
show 2 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
What does ".Strategy" do here? Is it Node? Is it Passport?
var LocalStrategy = require('passport-local').Strategy;
Everything up to '.Strategy' part I understand. I just want to know what '.Strategy' does. I have checked the documentation on passport-local module on npm. I have also checked Passport's documentation, and it is just used in code snippets. No explanation is provided.
I am working with the MEAN stack and we are using Passport to authenticate users.
node.js passport.js mean-stack
What does ".Strategy" do here? Is it Node? Is it Passport?
var LocalStrategy = require('passport-local').Strategy;
Everything up to '.Strategy' part I understand. I just want to know what '.Strategy' does. I have checked the documentation on passport-local module on npm. I have also checked Passport's documentation, and it is just used in code snippets. No explanation is provided.
I am working with the MEAN stack and we are using Passport to authenticate users.
node.js passport.js mean-stack
node.js passport.js mean-stack
edited Nov 10 at 18:16
asked Nov 10 at 18:06
UhHuhOkSure
1225
1225
Did you look at npmjs.com/package/passport-local? Search for "passport strategy"? I seem to be finding a fair bit of documentation.
– jonrsharpe
Nov 10 at 18:08
Yeah, that's the first place I looked. It doesn't exactly tell me what ".Strategy" does though. Everything leading up to the ".Strategy" part I understand.
– UhHuhOkSure
Nov 10 at 18:13
What do you mean what it does? You can see the implementation, it's open source. Or look at the abstract version: github.com/jaredhanson/passport-strategy
– jonrsharpe
Nov 10 at 18:16
I didn't know to look in the local strategy source code because there wasn't anything in the documentation about it. As far as I could tell, it could have been a Node thing or a Passport thing.
– UhHuhOkSure
Nov 10 at 18:31
But you can see where it's coming from when you require it, what other information would you need to find it? You can see in the index file it comes from strategy.js, which seems logical.
– jonrsharpe
Nov 10 at 18:32
|
show 2 more comments
Did you look at npmjs.com/package/passport-local? Search for "passport strategy"? I seem to be finding a fair bit of documentation.
– jonrsharpe
Nov 10 at 18:08
Yeah, that's the first place I looked. It doesn't exactly tell me what ".Strategy" does though. Everything leading up to the ".Strategy" part I understand.
– UhHuhOkSure
Nov 10 at 18:13
What do you mean what it does? You can see the implementation, it's open source. Or look at the abstract version: github.com/jaredhanson/passport-strategy
– jonrsharpe
Nov 10 at 18:16
I didn't know to look in the local strategy source code because there wasn't anything in the documentation about it. As far as I could tell, it could have been a Node thing or a Passport thing.
– UhHuhOkSure
Nov 10 at 18:31
But you can see where it's coming from when you require it, what other information would you need to find it? You can see in the index file it comes from strategy.js, which seems logical.
– jonrsharpe
Nov 10 at 18:32
Did you look at npmjs.com/package/passport-local? Search for "passport strategy"? I seem to be finding a fair bit of documentation.
– jonrsharpe
Nov 10 at 18:08
Did you look at npmjs.com/package/passport-local? Search for "passport strategy"? I seem to be finding a fair bit of documentation.
– jonrsharpe
Nov 10 at 18:08
Yeah, that's the first place I looked. It doesn't exactly tell me what ".Strategy" does though. Everything leading up to the ".Strategy" part I understand.
– UhHuhOkSure
Nov 10 at 18:13
Yeah, that's the first place I looked. It doesn't exactly tell me what ".Strategy" does though. Everything leading up to the ".Strategy" part I understand.
– UhHuhOkSure
Nov 10 at 18:13
What do you mean what it does? You can see the implementation, it's open source. Or look at the abstract version: github.com/jaredhanson/passport-strategy
– jonrsharpe
Nov 10 at 18:16
What do you mean what it does? You can see the implementation, it's open source. Or look at the abstract version: github.com/jaredhanson/passport-strategy
– jonrsharpe
Nov 10 at 18:16
I didn't know to look in the local strategy source code because there wasn't anything in the documentation about it. As far as I could tell, it could have been a Node thing or a Passport thing.
– UhHuhOkSure
Nov 10 at 18:31
I didn't know to look in the local strategy source code because there wasn't anything in the documentation about it. As far as I could tell, it could have been a Node thing or a Passport thing.
– UhHuhOkSure
Nov 10 at 18:31
But you can see where it's coming from when you require it, what other information would you need to find it? You can see in the index file it comes from strategy.js, which seems logical.
– jonrsharpe
Nov 10 at 18:32
But you can see where it's coming from when you require it, what other information would you need to find it? You can see in the index file it comes from strategy.js, which seems logical.
– jonrsharpe
Nov 10 at 18:32
|
show 2 more comments
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53241922%2fwhat-does-strategy-do-in-node-or-passport%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Did you look at npmjs.com/package/passport-local? Search for "passport strategy"? I seem to be finding a fair bit of documentation.
– jonrsharpe
Nov 10 at 18:08
Yeah, that's the first place I looked. It doesn't exactly tell me what ".Strategy" does though. Everything leading up to the ".Strategy" part I understand.
– UhHuhOkSure
Nov 10 at 18:13
What do you mean what it does? You can see the implementation, it's open source. Or look at the abstract version: github.com/jaredhanson/passport-strategy
– jonrsharpe
Nov 10 at 18:16
I didn't know to look in the local strategy source code because there wasn't anything in the documentation about it. As far as I could tell, it could have been a Node thing or a Passport thing.
– UhHuhOkSure
Nov 10 at 18:31
But you can see where it's coming from when you require it, what other information would you need to find it? You can see in the index file it comes from strategy.js, which seems logical.
– jonrsharpe
Nov 10 at 18:32