angularjs - Securing Symfony RESTful API consumed by angular front? -


i have set symfony based api being used angular front end totally dependent of (user registration included)

i have read multiple threads recommending using wsse or fosoauthserverbundle i'm not sure best method ?

if understood correctly, wsse has send each api request x-wsse headers make me think not best suited performance.

about fosauthserverbundle have never used , looks bit complicated me compared wsse, that's why i'm asking there before trying implement it.

i have 2 simple groups of user (basic , admin), best way secure api, additionally providing easy way keep user persistence (i mean accesses through different pages)?

how should in angular front side ?

thanks help.

refs: http://blog.tankist.de/blog/2013/07/16/oauth2-explained-part-1-principles-and-terminology/

http://obtao.com/blog/2013/06/configure-wsse-on-symfony-with-fosrestbundle/

it depends on requirements are.

first of all, oauth 2 authentication mechanism/spec can use in combination sessions/bearer tokens/... applies local accounts (since want user registration).

fosauthserverbundle bundle implement server-side of oauth2 specification. means can expose oauth2 side of api other applications , allow them use accounts authenticate. think google login, twitter login, etc own app.

this has nothing way validate / authorize requests after initial login has taken place.

do want implement stateless authentication? recommend using new json web token (jwt) specification.

see symfony bundle (lexikjwtauthenticationbundle) , jwt description (jwt.io)

there many resources on angular side of things , api part pretty straightforward.

wsse not seem suited implement in restful api , have no experience using/implementing cannot comment on much.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -