Authentication + query at the same code

27 views
Skip to first unread message

Daniel Mota

unread,
Jan 20, 2017, 2:49:45 PM1/20/17
to nodejs
Dear all,

I am new at NodeJS, so my apologizes for a "simple" question, but this is a problem in my project.

During a webserver I built, I need to do two things:

1) Authenticate using POST a token I have registered
2) Send the search string using GET 

What happens is that I get a true on the first, but a blocking msg on the second.

Maybe the synchronous aspect of the language is tricking me.

Anyone solved this challenge?


Thanks a lot!


Regards


DMota

DaneiL

unread,
Jan 20, 2017, 6:34:45 PM1/20/17
to nod...@googlegroups.com
I have an example on my github profile, doing getting a token via post. Using node and express.
https://github.com/danizavtz/tokenAuth
U can see the code @ server/services/login.service.js

I don't get the question 'search string using get' thing.
You mean query params in the URL?
Something like: localhost/api/users/name=?foo


--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/5f589937-b5c3-46c3-bce1-bb1bf5fff7f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
[]'s

selenag...@yahoo.com

unread,
Jan 20, 2017, 11:37:57 PM1/20/17
to nod...@googlegroups.com

--------------------------------------------
On Fri, 1/20/17, DaneiL <dani...@gmail.com> wrote:

Subject: Re: [nodejs] Authentication + query at the same code
To: nod...@googlegroups.com
Date: Friday, January 20, 2017, 10:16 PM

I have an example on my github
profile, doing getting a token via post. Using node and
express.
https://github.com/danizavtz/tokenAuth
U can see the code @
server/services/login.service.js

I don't get the question 'search
string using get' thing.
You mean
query params in the URL?
Something
like: localhost/api/users/name=?foo


On 20 January 2017 at
10:54, Daniel Mota <danielmot...@gmail.com>
wrote:
Dear all,
I am new
at NodeJS, so my apologizes for a "simple"
question, but this is a problem in my project.
During a webserver I built, I need
to do two things:
1)
Authenticate using POST a token I have
registered2) Send the search string using
from it, send an email to nodejs+un...@googlegroups.com.

To post to this group, send email to nod...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CAET7tnYupMmGUXaPmRuM28MQ8Syjhz4tDVG7F65nph_VDoD4AA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.
eoarece periclita fiinta natiunii romane inlaturarea regimului dualist tro-ungar a constituit principalul obiectiv al luptei nationale a populatiei lanesti. inca la 31 decembrie 1866 George Bar tiu si Ion Ratiu au inaintat aratului un memoriu in care i-au cerut sa nu sanctioneze anexarea Transil-iei la Ungaria. S-a desfasurat de asemenea o vasta miscare petitionara si oresam favoarea drepturilor nationale romanesti. Ea a culminat cu Pronun-ventul prezentat la Blaj in mai 1868. Aceasta a reprezentat prima actiune de rasunet a romanilor impotriva dualismului. El a fost redactat de George itiu si reprodus in publicatiile Federatiunea Telegraful roman s\ Gazeta Transilvania . S-a solicitat recunoasterea autonomiei Transilvaniei a legilor ate de Dieta de la Sibiu in 1863-1864 si organizarea unui nou for legislativ pe a unei reprezentatiuni populare . Actionarea in judecata a autorilor sai si a r ziaristi a dezlantuit o vie agitatie atat in Transilvania cat si la Bucuresti le au luat pozitie intre altele ziarele Romanul s\ Perseverenta .

gorma...@yahoo.com

unread,
Jan 21, 2017, 4:42:37 PM1/21/17
to nod...@googlegroups.com

--------------------------------------------
On Sat, 1/21/17, selenagracia795 via nodejs <nod...@googlegroups.com> wrote:

Subject: Re: [nodejs] Authentication + query at the same code
To: nod...@googlegroups.com
Date: Saturday, January 21, 2017, 6:23 AM
https://groups.google.com/d/msgid/nodejs/1093544597.794047.1484972600612%40mail.yahoo.com.
For more options, visit
https://groups.google.com/d/optout.ilescu pentru monumentul de la Adamclisi Tropaeum Traiani s\ mai tarziu
Reply all
Reply to author
Forward
0 new messages