You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by robianmcd <ro...@gmail.com> on 2013/08/19 20:32:22 UTC

Send HTTP 401 for unauthenticated user

Is it possible to send an HTTP 401 response when an unauthenticated user
sends a GET/POST/etc to a specific url. I'm using wicketstuff-security-swarm
and the default behavior is to redirect to the login page. I'm trying to
create a REST endpoint from wicket so it doesn't make sense to respond with
the HTML for the login page when an unauthenticated user hits the url.

I'm new to wicket security so any pointers would be greatly appreciated.

Thanks,
Rob



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Send-HTTP-401-for-unauthenticated-user-tp4660957.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Send HTTP 401 for unauthenticated user

Posted by Martin Grigorov <mg...@apache.org>.
You will have to consult with Swarm documentation ...
I have no experience with it.

For Wicket's default authz see
http://wicketguide.comsysto.com/guide/chapter19.html


On Mon, Aug 19, 2013 at 11:13 PM, robianmcd <ro...@gmail.com> wrote:

> From where? No code on my REST endpoint page ever gets hit if the user
> isn't
> logged in.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Send-HTTP-401-for-unauthenticated-user-tp4660957p4660961.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Send HTTP 401 for unauthenticated user

Posted by robianmcd <ro...@gmail.com>.
>From where? No code on my REST endpoint page ever gets hit if the user isn't
logged in.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Send-HTTP-401-for-unauthenticated-user-tp4660957p4660961.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Send HTTP 401 for unauthenticated user

Posted by Martin Grigorov <mg...@apache.org>.
throw new
org.apache.wicket.request.http.flow.AbortWithHttpErrorCodeException(401,
"Not authorized")


On Mon, Aug 19, 2013 at 9:32 PM, robianmcd <ro...@gmail.com> wrote:

> Is it possible to send an HTTP 401 response when an unauthenticated user
> sends a GET/POST/etc to a specific url. I'm using
> wicketstuff-security-swarm
> and the default behavior is to redirect to the login page. I'm trying to
> create a REST endpoint from wicket so it doesn't make sense to respond with
> the HTML for the login page when an unauthenticated user hits the url.
>
> I'm new to wicket security so any pointers would be greatly appreciated.
>
> Thanks,
> Rob
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Send-HTTP-401-for-unauthenticated-user-tp4660957.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>