org.apache.jena.atlas.web.auth
Class FormLogin

java.lang.Object
  extended by org.apache.jena.atlas.web.auth.FormLogin
Direct Known Subclasses:
ApacheModAuthFormLogin

public class FormLogin
extends Object

Represents form login credentials


Constructor Summary
FormLogin(String loginFormURL, String loginUserField, String loginPasswordField, String username, char[] password)
          Creates new form login credentials
 
Method Summary
 void clearCookies()
          Clears cookies associated with login, may be useful if you need to force a fresh login attempt for any reason.
 org.apache.http.client.CookieStore getCookies()
          Gets cookies associated with this login
 org.apache.http.HttpEntity getLoginEntity()
          Gets the HTTP Entity for the Login request
 String getLoginFormURL()
          Gets the login form URL
 boolean hasCookies()
          Gets whether any cookies are associated with this login
 void setCookies(org.apache.http.client.CookieStore cookies)
          Sets cookies associated with this login
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormLogin

public FormLogin(String loginFormURL,
                 String loginUserField,
                 String loginPasswordField,
                 String username,
                 char[] password)
Creates new form login credentials

Parameters:
loginFormURL - Login Form URL
loginUserField - Login Form User field name
loginPasswordField - Login Form Password field name
username - User name
password - Password
Method Detail

getLoginFormURL

public String getLoginFormURL()
Gets the login form URL

Returns:
Login Form URL

getLoginEntity

public org.apache.http.HttpEntity getLoginEntity()
                                          throws UnsupportedEncodingException
Gets the HTTP Entity for the Login request

Returns:
Login request entity
Throws:
UnsupportedEncodingException - Thrown if the platform does not support UTF-8

hasCookies

public boolean hasCookies()
Gets whether any cookies are associated with this login

Returns:
True if there are cookies, false otherwise

getCookies

public org.apache.http.client.CookieStore getCookies()
Gets cookies associated with this login

Returns:
Cookies

setCookies

public void setCookies(org.apache.http.client.CookieStore cookies)
Sets cookies associated with this login

Parameters:
cookies -

clearCookies

public void clearCookies()
Clears cookies associated with login, may be useful if you need to force a fresh login attempt for any reason.



Licenced under the Apache License, Version 2.0