php - Make an oauth2 client with symfony2 -


i made oauth2 server, , want make c client using symfony2 connect (when click login, i'm redirected on site oauth2 server, login, i'm redirected client token).

i followed this: http://symfony.com/doc/current/cookbook/security/api_key_authentication.html

the problem whem retrieve apikey. if decide use implicit grant oauth2, token sent that: example.com/#token can't retrieve query->get. if send code it's fine, when tried curl server somehow broke (yeah, not specific error, still looking it)

so wondering, proper way of doing it?

also, when write specific url, why need one, if can check everywhere?

thanks :)

you can token in php :

for known url if have url hash, part after # called fragment.

$url=parse_url($yoururl); echo $url["fragment"]; 

if don't have url in backend, need javascript magic :

var token = window.location.hash; 

then send backend.

maybe there other more symfonyc way properly, never used oauth2 yet.. :d


Popular posts from this blog