public class LoginUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
FORM_AUTH_URL |
| Constructor and Description |
|---|
LoginUtil() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends org.apache.sling.testing.clients.AbstractSlingClient> |
buildFormAuthPost(T graniteClient,
String user,
String pass,
String page)
Creates the post request with the form for authentication
|
static org.apache.http.HttpResponse |
doGetWithLoginToken(String loginToken,
CQClient cqClient,
String testPage)
Retrieves a page using the given login token
|
static <T extends org.apache.sling.testing.clients.AbstractSlingClient> |
getLoginToken(T graniteClient,
String targetPage)
Retrieves a login token
|
public static final String FORM_AUTH_URL
public static org.apache.http.HttpResponse doGetWithLoginToken(String loginToken, CQClient cqClient, String testPage) throws IOException
loginToken - login tokencqClient - client to usetestPage - path to the pageIOException - if the request failspublic static <T extends org.apache.sling.testing.clients.AbstractSlingClient> String getLoginToken(T graniteClient, String targetPage) throws IOException
T - client typegraniteClient - client to usetargetPage - path to the pageIOException - if the request failspublic static <T extends org.apache.sling.testing.clients.AbstractSlingClient> org.apache.http.client.methods.HttpPost buildFormAuthPost(T graniteClient,
String user,
String pass,
String page)
T - client typegraniteClient - client to useuser - usernamepass - passwordpage - path to the pageCopyright © 2018. All rights reserved.