Package org.takes.facets.auth
Class RqWithAuth
- java.lang.Object
-
- org.takes.rq.RqWrap
-
- org.takes.facets.auth.RqWithAuth
-
public final class RqWithAuth extends RqWrap
Request with already authenticated identity.This class is very useful for unit testing, when you need to test a "take" that requires a request to contain an already authenticated user.
The class is immutable and thread-safe.
- Since:
- 0.18
-
-
Constructor Summary
Constructors Constructor Description RqWithAuth(String urn)
Ctor.RqWithAuth(String urn, Request req)
Ctor.RqWithAuth(Identity identity)
Ctor.RqWithAuth(Identity identity, String header, Request req)
Ctor.RqWithAuth(Identity identity, Request req)
Ctor.
-
-
-
Constructor Detail
-
RqWithAuth
public RqWithAuth(String urn) throws IOException
Ctor.- Parameters:
urn
- URN of the tester- Throws:
IOException
- If fails
-
RqWithAuth
public RqWithAuth(Identity identity) throws IOException
Ctor.- Parameters:
identity
- Identity- Throws:
IOException
- If fails
-
RqWithAuth
public RqWithAuth(String urn, Request req) throws IOException
Ctor.- Parameters:
urn
- URN of the testerreq
- Request- Throws:
IOException
- If fails
-
RqWithAuth
public RqWithAuth(Identity identity, Request req) throws IOException
Ctor.- Parameters:
identity
- Identityreq
- Request- Throws:
IOException
- If fails
-
RqWithAuth
public RqWithAuth(Identity identity, String header, Request req) throws IOException
Ctor.- Parameters:
identity
- Identityheader
- Header namereq
- Request- Throws:
IOException
- If fails
-
-