public class SesnKey
extends java.lang.Object
Utility for creating and manipulating session security keys
Session key strategy with HttpCliChan backchannel:
Key Values:
Key values less than 1 are invalid.
-1 = An attempt to set an invalid key value occured
0 = An un-initilized key. (Similar to null)
Key values between 1 and MAXKEY (inclusive) are valid
1 = A valid value, but can only be set explicitly
1 is for use as a key value where full session
authentication is not required.
| Modifier and Type | Field and Description |
|---|---|
static SesnKey |
DEFAULT_KEY
Default session key
|
static java.lang.String[] |
DEP_LIST
Class dependencies
|
protected static int |
MAXKEY
Maximum valid key value
|
static java.lang.String |
VERSION
Class version
|
| Constructor and Description |
|---|
SesnKey()
Create a new session key with a random value.
|
SesnKey(java.lang.String value)
Create a new session key.
|
| Modifier and Type | Method and Description |
|---|---|
static SesnKey |
bcConnKey(SesnKey clientKey,
SesnKey serverKey)
Generate Backchannel connect key.
|
static SesnKey |
clientKey(SesnKey fcConnKey,
SesnKey bcConnKey)
Assemble full client key from connect keys.
|
static void |
configure(boolean setDebugClass)
Configure the class.
|
static SesnKey |
connAckKey(SesnKey clientKey,
SesnKey serverKey)
Generate connection acknowledge key.
|
boolean |
equals(SesnKey key2)
Compare keys.
|
static SesnKey |
fcConnKey(SesnKey clientKey,
SesnKey serverKey)
Generate Frontchannel connect key.
|
boolean |
newBcKeyValid(SesnKey bcConnKey)
Determine if a backchannel key is a valid successor to this key.
|
boolean |
newFcKeyValid(SesnKey fcConnKey)
Determine if a frontchannel key is a valid successor to this key.
|
void |
setDebugging(boolean debug)
Set or clear debug mode.
|
java.lang.String |
toString()
Get the key as a string.
|
public static final java.lang.String VERSION
public static final java.lang.String[] DEP_LIST
public static final SesnKey DEFAULT_KEY
protected static final int MAXKEY
public SesnKey()
public SesnKey(java.lang.String value)
value - String representation of value for new keypublic static void configure(boolean setDebugClass)
setDebugClass - If true, turn on debugging for static methodspublic static SesnKey fcConnKey(SesnKey clientKey, SesnKey serverKey)
clientKey - Client session keyserverKey - Server session keypublic static SesnKey bcConnKey(SesnKey clientKey, SesnKey serverKey)
clientKey - Client session keyserverKey - Server session keypublic static SesnKey clientKey(SesnKey fcConnKey, SesnKey bcConnKey)
fcConnKey - Frontchannel connect keybcConnKey - Backchannel connect keypublic static SesnKey connAckKey(SesnKey clientKey, SesnKey serverKey)
clientKey - Client session keyserverKey - Server session keypublic void setDebugging(boolean debug)
debug - If true, debugging is set for this instancepublic boolean equals(SesnKey key2)
key2 - Key to be compared to this keypublic boolean newFcKeyValid(SesnKey fcConnKey)
fcConnKey - The key to validatepublic boolean newBcKeyValid(SesnKey bcConnKey)
bcConnKey - The key to validatepublic java.lang.String toString()
toString in class java.lang.Object