public class CookieSignIn
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
CookieSignIn.CookieCallback |
| Modifier and Type | Field and Description |
|---|---|
protected static java.util.Map<java.lang.String,Authenticator> |
authenticators |
protected java.net.CookieManager |
cookieManager |
protected java.lang.String |
password |
protected Session |
session |
protected java.lang.String |
username |
| Modifier | Constructor and Description |
|---|---|
protected |
CookieSignIn(Session session) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getBody(java.lang.String username,
java.lang.String password) |
protected Builder |
getBuilder(Session session,
java.lang.String username,
java.lang.String password) |
protected static Callback |
getCallback(java.lang.String server,
CookieSignIn.CookieCallback callback,
java.net.CookieManager cookieManager,
CookieAuthentication authentication) |
protected static CookieAuthentication |
getCookieAuthentication(Authentication authentication) |
protected static java.lang.String |
getHttpCookies(java.net.CookieStore cookieStore) |
protected java.lang.String |
getLoginURL(java.lang.String server) |
protected static java.lang.String |
parseAuthToken(java.lang.String body) |
protected static Session |
parseResponse(Response response,
java.lang.String server,
java.net.CookieManager cookieManager,
CookieAuthentication authentication) |
static void |
registerAuthenticatorForServer(java.lang.String server,
Authenticator authenticator) |
protected Call |
signIn() |
static Session |
signIn(Session session) |
static void |
signIn(Session session,
CookieSignIn.CookieCallback callback) |
static void |
signIn(Session session,
CookieSignIn.CookieCallback callback,
Authenticator authenticator) |
protected java.net.CookieManager cookieManager
protected java.lang.String password
protected Session session
protected java.lang.String username
protected static final java.util.Map<java.lang.String,Authenticator> authenticators
protected CookieSignIn(Session session)
public static void registerAuthenticatorForServer(java.lang.String server,
Authenticator authenticator)
public static Session signIn(Session session) throws java.lang.Exception
java.lang.Exceptionpublic static void signIn(Session session, CookieSignIn.CookieCallback callback)
public static void signIn(Session session, CookieSignIn.CookieCallback callback, Authenticator authenticator)
protected static Callback getCallback(java.lang.String server,
CookieSignIn.CookieCallback callback,
java.net.CookieManager cookieManager,
CookieAuthentication authentication)
protected static CookieAuthentication getCookieAuthentication(Authentication authentication)
protected static java.lang.String getHttpCookies(java.net.CookieStore cookieStore)
protected static java.lang.String parseAuthToken(java.lang.String body)
throws AuthenticationException,
java.io.IOException
AuthenticationExceptionjava.io.IOExceptionprotected static Session parseResponse(Response response, java.lang.String server, java.net.CookieManager cookieManager, CookieAuthentication authentication) throws java.lang.Exception
java.lang.Exceptionprotected java.lang.String getBody(java.lang.String username,
java.lang.String password)
throws java.io.IOException
java.io.IOExceptionprotected Builder getBuilder(Session session, java.lang.String username, java.lang.String password) throws java.io.IOException
java.io.IOExceptionprotected java.lang.String getLoginURL(java.lang.String server)
protected Call signIn()
throws java.lang.Exception
java.lang.Exception