F
F
FanKiLL2014-11-02 22:17:07
JavaScript
FanKiLL, 2014-11-02 22:17:07

Angular.js - Authorization and Authentication, which is correct?

I'm going to learn angular, js, I like the idea that one api will be for both the site and the mobile. applications.
Only I'm still confused about how to do authorization and authentication correctly.
I'm used to my api, when logging in, an access_token was issued and then this token is checked every time the api is accessed. The token is usually sent in headers.
How does this happen in angular.js? - maybe there are some screencasts or articles
where this moment is chewed.
Tell me which way to dig.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
mindnomind, 2015-04-26
@mindnomind

May be useful: Authentication Methods in AngularJS

E
Elizaveta Borisova, 2014-11-02
@Elizaveta

Something like this:
$http.defaults.headers.common['Authentication'] = 'authentication';
You don't need to dig a lot.

S
Sergey, 2014-11-02
Protko @Fesor

Just like with mobile apps. stateless and all that.

I
Ilya, 2014-11-02
@FireGM

I'm not sure, but maybe
richardtier.com/2014/03/15/authenticate-using-djan...
It's there for django, but it also goes through headers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question