Mocking digest authentication in RestEasy
Posted
by
Ralph
on Stack Overflow
See other posts from Stack Overflow
or by Ralph
Published on 2011-03-10T17:40:49Z
Indexed on
2012/07/07
15:16 UTC
Read the original article
Hit count: 252
I am using RestEasy to develop a REST server and using the mock dispatcher (org.jboss.resteasy.mockMockDispatcherFactory
) for testing the service in my unit tests. My service requires digest authentication and I would to make that part of my testing.
Each of my services accepts a @Context SecurityContext securityContext
parameter.
Is there any way is inject a fake SecurityContext
in the dispatcher so that I can test that my security methods function properly?
© Stack Overflow or respective owner