jaliss / securesocial

A module that provides OAuth, OAuth2 and OpenID authentication for Play Framework applications
http://www.securesocial.ws
Apache License 2.0
1.19k stars 510 forks source link

SecuredAction ajaxCall replacement #538

Closed sejkorat closed 9 years ago

sejkorat commented 9 years ago

Hi Jaliss,

Is there any replacement in the latest version for ajaxCall property? I would get status 401 when I call SecuredAction from ajax.

Thanks, Tomas

hohl commented 9 years ago

vote up, would need that too

jaliss commented 9 years ago

SecuredAction uses content negotiation now. See the notAuthenticatedResult and notAuthorizedResult in the SecureSocial trait for Scala. For the Java API there's a responses parameter in the SecuredAction annotation that takes care of that (see the SecuredActionResponses interface too)