|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dyuproject.openid.DiffieHellmanAssociation
public final class DiffieHellmanAssociation
Association using DiffieHellman session - which allows two parties that have no prior knowledge of each other to jointly establish a shared secret key over an insecure communications channel.
Field Summary |
---|
Fields inherited from interface com.dyuproject.openid.Association |
---|
ASSOC_HMAC_SHA1, ASSOC_HMAC_SHA256, SESSION_DH_SHA1, SESSION_DH_SHA256, SESSION_NO_ENCRYPTION |
Constructor Summary | |
---|---|
DiffieHellmanAssociation()
|
|
DiffieHellmanAssociation(SessionType type)
|
Method Summary | |
---|---|
boolean |
associate(OpenIdUser user,
OpenIdContext context)
Associates the user with his openid provider and stores the association data for future verification. |
SessionType |
getSessionAssociationType()
Gets the session type of this association. |
static void |
parseInputByLineSeparator(BufferedReader br,
char keyValueSeparator,
Map<String,Object> parseMap)
Parses the key/value pair of each line separated by the given char keyValueSeparator . |
boolean |
verifyAuth(OpenIdUser user,
Map<String,String> authRedirect,
OpenIdContext context)
Verifies the authentication response by validating against the previous association data stored from Association.associate(OpenIdUser, OpenIdContext) |
static byte[] |
xor(BigInteger sharedSecretKey,
byte[] encMacKey,
String digestType)
Digest the given sharedSecretKey into a byte array and performx xor of
each single byte against the given encMacKey . |
static byte[] |
xor(byte[] sharedSecret,
byte[] encMacKey)
Performs xor of each single byte of the 2 byte arrays. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DiffieHellmanAssociation()
public DiffieHellmanAssociation(SessionType type)
Method Detail |
---|
public SessionType getSessionAssociationType()
public boolean associate(OpenIdUser user, OpenIdContext context) throws Exception
Association
associate
in interface Association
Exception
public boolean verifyAuth(OpenIdUser user, Map<String,String> authRedirect, OpenIdContext context) throws Exception
Association
Association.associate(OpenIdUser, OpenIdContext)
verifyAuth
in interface Association
Exception
public static byte[] xor(BigInteger sharedSecretKey, byte[] encMacKey, String digestType) throws Exception
sharedSecretKey
into a byte array and performx xor of
each single byte against the given encMacKey
.
Exception
public static byte[] xor(byte[] sharedSecret, byte[] encMacKey) throws Exception
IllegalStateException
- if the 2 byte arrays are not the same size.
Exception
public static void parseInputByLineSeparator(BufferedReader br, char keyValueSeparator, Map<String,Object> parseMap) throws IOException
keyValueSeparator
.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |