|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectMHAuthTKT
public class MHAuthTKT
Implements AuthTKT ticket generation and validation. mod_auth_tkt http://www.openfusion.com.au/labs/mod_auth_tkt/ is a single-sign-on C module for Apache.
Field Summary | |
---|---|
static String |
COOKIE_INVALID
Constant indicating cookie is invalid. |
static String |
COOKIE_OK
Constant indicating cookie is valid. |
static String |
COOKIE_TIMEOUT
Constant indicating cookie is valid but TKTAuthTimeout has passed. |
Constructor Summary | |
---|---|
MHAuthTKT(String authTKTConfigFilePath)
Constructor using configuration file. |
|
MHAuthTKT(String authTKTConfigFilePath,
String ipAddress)
Constructor using configuration file and IP Address. |
|
MHAuthTKT(String authTKTConfigFilePath,
String userId,
String ipAddress)
Constructor using configuration file, user id, and IP Address. |
|
MHAuthTKT(String authTKTConfigFilePath,
String userId,
String ipAddress,
String userData)
Constructor using configuration file, user id, IP Address, and user data. |
|
MHAuthTKT(String authTKTConfigFilePath,
String userId,
String ipAddress,
String[] tokenList,
String userData)
Constructor using configuration file, user id, IP Address, token list, user data, and timestamp. |
|
MHAuthTKT(String authTKTConfigFilePath,
String userId,
String ipAddress,
String[] tokenList,
String userData,
long timestamp)
Constructor using configuration file, user id, IP Address, token list, user data, and timestamp. |
|
MHAuthTKT(String authTKTConfigFilePath,
String userId,
String ipAddress,
String userData,
long timestamp)
Constructor using configuration file, user id, IP Address, user data, and timestamp. |
Method Summary | |
---|---|
String |
getCookieValue()
Generates a cookie value. |
String |
getIPAddress()
Gets the IP Address currently set to be used in generating/validating tickets. |
String |
getTKTAuthConfigValue(String configKey)
Gets the specified AuthTKT configuration option. |
String |
getUserId()
Gets the user id currently set to be used in generating/validating tickets. |
static HashMap<String,Object> |
parseCookie(String cookieValue)
Parses a cookie value string into components. |
void |
setIPAddress(InetAddress ipAddress)
Sets the IP Address to use in generating/validating tickets. |
void |
setIPAddress(String ipAddress)
Sets the IP Address to use in generating/validating tickets. |
void |
setUserId(String userId)
Sets the user id to use in generating/validating tickets. |
String |
validateCookie(String cookieValue)
Validates the cookie value. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String COOKIE_OK
public static final String COOKIE_INVALID
public static final String COOKIE_TIMEOUT
TKTAuthTimeout
has passed.
Constructor Detail |
---|
public MHAuthTKT(String authTKTConfigFilePath)
authTKTConfigFilePath
- Path to file to be used for retrieving of AuthTKT optionspublic MHAuthTKT(String authTKTConfigFilePath, String ipAddress)
authTKTConfigFilePath
- Path to file to be used for retrieving of AuthTKT optionsipAddress
- IP Address to use in generating/validating ticket if TKTAuthIgnoreIP
is offpublic MHAuthTKT(String authTKTConfigFilePath, String userId, String ipAddress)
authTKTConfigFilePath
- Path to file to be used for retrieving of AuthTKT optionsuserId
- user id to use in generating/validating ticketipAddress
- IP Address to use in generating/validating ticket if TKTAuthIgnoreIP
is offpublic MHAuthTKT(String authTKTConfigFilePath, String userId, String ipAddress, String userData)
authTKTConfigFilePath
- Path to file to be used for retrieving of AuthTKT options.userId
- user id to use in generating/validating ticketipAddress
- IP Address to use in generating/validating ticket if TKTAuthIgnoreIP
is offuserData
- optional user data to use in generating/validating ticketpublic MHAuthTKT(String authTKTConfigFilePath, String userId, String ipAddress, String userData, long timestamp)
authTKTConfigFilePath
- Path to file to be used for retrieving of AuthTKT options.userId
- user id to use in generating/validating ticketipAddress
- IP Address to use in generating/validating ticket if TKTAuthIgnoreIP
is offuserData
- optional user data to use in generating/validating tickettimestamp
- timestamp in seconds since epoch to use in generating/validating ticketpublic MHAuthTKT(String authTKTConfigFilePath, String userId, String ipAddress, String[] tokenList, String userData)
authTKTConfigFilePath
- Path to file to be used for retrieving of AuthTKT options.userId
- user id to use in generating/validating ticketipAddress
- IP Address to use in generating/validating ticket if TKTAuthIgnoreIP
is offtokenList
- optional comma separated token list to use in generating/validating ticketuserData
- optional user data to use in generating/validating ticketpublic MHAuthTKT(String authTKTConfigFilePath, String userId, String ipAddress, String[] tokenList, String userData, long timestamp)
authTKTConfigFilePath
- Path to file to be used for retrieving of AuthTKT optionsuserId
- user id to use in generating/validating ticketipAddress
- IP Address to use in generating/validating ticket if TKTAuthIgnoreIP
is offtokenList
- optional comma separated token list to use in generating/validating ticketuserData
- optional user data to use in generating/validating tickettimestamp
- timestamp in seconds since epoch to use in generating/validating ticketMethod Detail |
---|
public final String getCookieValue()
public final String validateCookie(String cookieValue)
cookieValue
- Cookie to be validated. Value can be URL and/or Base64 encoded
AuthTKTTimeout
has not passed, false otherwisepublic static final HashMap<String,Object> parseCookie(String cookieValue) throws IllegalArgumentException
cookieValue
- Cookie value to split into components
IllegalArgumentException
public void setUserId(String userId)
userId
- user id to use in generating/validating ticketpublic String getUserId()
public void setIPAddress(String ipAddress)
ipAddress
- IP Address to use in generating/validating ticket if TKTAuthIgnoreIP
is offpublic void setIPAddress(InetAddress ipAddress)
ipAddress
- IP Address to use in generating/validating ticket if TKTAuthIgnoreIP
is offpublic String getIPAddress()
public String getTKTAuthConfigValue(String configKey)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |