public class AssociationSessionType extends Object implements Comparable
Association requests and responses must have one of the AssociationSessionType's defined here.
Compatibility mode flag defines backwards-compatibile value sets allowed in OpenID 1.x, but not in OpenID 2
DiffieHellmanSession| Modifier and Type | Field and Description |
|---|---|
static AssociationSessionType |
DH_COMPAT_SHA1 |
static AssociationSessionType |
DH_SHA1 |
static AssociationSessionType |
DH_SHA256 |
static AssociationSessionType |
NO_ENCRYPTION_COMPAT_SHA1MAC |
static AssociationSessionType |
NO_ENCRYPTION_SHA1MAC |
static AssociationSessionType |
NO_ENCRYPTION_SHA256MAC |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object object)
Compares to another AssociationSessionType; used for sorting.
|
static AssociationSessionType |
create(String sessType)
Creates a OpenID 2 AssociationSessionType with the specified session type
and HMAC-SHA1 association type.
|
static AssociationSessionType |
create(String sessType,
String assocType)
Creates a OpenID 2 AssociationSessionType with the specified session and
association types.
|
static AssociationSessionType |
create(String sessType,
String assocType,
boolean compatibility)
Creates a AssociationSessionType with the specified session and
association types.
|
String |
getAssociationType()
Gets the association type.
|
String |
getHAlgorithm()
Gets the H algorithm of the Diffie-Hellman session, or null for
no-encryption session types.
|
int |
getKeySize()
Gets the MAC key size, in bits, of this association type.
|
String |
getSessionType()
Gets the session type.
|
boolean |
isBetter(AssociationSessionType other)
Returns true if the specified argument's encryption level is considered
better than the one of the current instance.
|
boolean |
isVersion2()
Returns true for OpenID 2 AssociationSessionType's, or false for
OpenID 1.x types.
|
String |
toString() |
public static final AssociationSessionType NO_ENCRYPTION_SHA1MAC
public static final AssociationSessionType NO_ENCRYPTION_COMPAT_SHA1MAC
public static final AssociationSessionType NO_ENCRYPTION_SHA256MAC
public static final AssociationSessionType DH_SHA1
public static final AssociationSessionType DH_COMPAT_SHA1
public static final AssociationSessionType DH_SHA256
public static AssociationSessionType create(String sessType) throws AssociationException
sessType - The session type.AssociationExceptionpublic static AssociationSessionType create(String sessType, String assocType) throws AssociationException
sessType - The session type.assocType - The association type.AssociationExceptionpublic static AssociationSessionType create(String sessType, String assocType, boolean compatibility) throws AssociationException
Compatibility flag defines backwards-compatibile value sets allowed in OpenID 1.x, but not in OpenID 2
sessType - The session type.assocType - The association type.compatibility - True for OpenID 1.x association /
session types.AssociationException - For unsupported parameter sets.public String getSessionType()
public String getHAlgorithm()
public String getAssociationType()
public int getKeySize()
public int compareTo(Object object)
compareTo in interface Comparablepublic boolean isBetter(AssociationSessionType other)
public boolean isVersion2()
Copyright © 2013 Sxip. All Rights Reserved.