org.openid4java.association
Class Association
java.lang.Object
org.openid4java.association.Association
- All Implemented Interfaces:
- Serializable
public class Association
- extends Object
- implements Serializable
- Author:
- Marius Scurtescu, Johnny Bufu
- See Also:
- Serialized Form
|
Method Summary |
static Association |
createHmacSha1(String handle,
byte[] macKeyBytes,
Date expDate)
|
static Association |
createHmacSha1(String handle,
byte[] macKeyBytes,
int expiryIn)
|
static Association |
createHmacSha256(String handle,
byte[] macKeyBytes,
Date expDate)
|
static Association |
createHmacSha256(String handle,
byte[] macKeyBytes,
int expiryIn)
|
protected static SecretKey |
createMacKey(String algorithm,
byte[] macKey)
|
static Association |
generate(String type,
String handle,
int expiryIn)
|
static Association |
generateHmacSha1(String handle,
int expiryIn)
|
static Association |
generateHmacSha256(String handle,
int expiryIn)
|
protected static SecretKey |
generateMacKey(String algorithm,
int keySize)
|
protected static SecretKey |
generateMacSha1Key()
|
protected static SecretKey |
generateMacSha256Key()
|
Date |
getExpiry()
|
static Association |
getFailedAssociation(Date expiry)
|
static Association |
getFailedAssociation(int expiryIn)
|
String |
getHandle()
|
SecretKey |
getMacKey()
|
String |
getType()
|
boolean |
hasExpired()
|
static boolean |
isHmacSha1Supported()
|
static boolean |
isHmacSha256Supported()
|
static boolean |
isHmacSupported(String hMacType)
|
protected byte[] |
sign(byte[] data)
|
String |
sign(String text)
|
boolean |
verifySignature(String text,
String signature)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FAILED_ASSOC_HANDLE
public static final String FAILED_ASSOC_HANDLE
- See Also:
- Constant Field Values
TYPE_HMAC_SHA1
public static final String TYPE_HMAC_SHA1
- See Also:
- Constant Field Values
TYPE_HMAC_SHA256
public static final String TYPE_HMAC_SHA256
- See Also:
- Constant Field Values
HMAC_SHA1_ALGORITHM
public static final String HMAC_SHA1_ALGORITHM
- See Also:
- Constant Field Values
HMAC_SHA256_ALGORITHM
public static final String HMAC_SHA256_ALGORITHM
- See Also:
- Constant Field Values
HMAC_SHA1_KEYSIZE
public static final int HMAC_SHA1_KEYSIZE
- See Also:
- Constant Field Values
HMAC_SHA256_KEYSIZE
public static final int HMAC_SHA256_KEYSIZE
- See Also:
- Constant Field Values
getFailedAssociation
public static Association getFailedAssociation(Date expiry)
getFailedAssociation
public static Association getFailedAssociation(int expiryIn)
generate
public static Association generate(String type,
String handle,
int expiryIn)
throws AssociationException
- Throws:
AssociationException
generateHmacSha1
public static Association generateHmacSha1(String handle,
int expiryIn)
createHmacSha1
public static Association createHmacSha1(String handle,
byte[] macKeyBytes,
int expiryIn)
createHmacSha1
public static Association createHmacSha1(String handle,
byte[] macKeyBytes,
Date expDate)
generateHmacSha256
public static Association generateHmacSha256(String handle,
int expiryIn)
createHmacSha256
public static Association createHmacSha256(String handle,
byte[] macKeyBytes,
int expiryIn)
createHmacSha256
public static Association createHmacSha256(String handle,
byte[] macKeyBytes,
Date expDate)
generateMacKey
protected static SecretKey generateMacKey(String algorithm,
int keySize)
generateMacSha1Key
protected static SecretKey generateMacSha1Key()
generateMacSha256Key
protected static SecretKey generateMacSha256Key()
isHmacSupported
public static boolean isHmacSupported(String hMacType)
isHmacSha256Supported
public static boolean isHmacSha256Supported()
isHmacSha1Supported
public static boolean isHmacSha1Supported()
createMacKey
protected static SecretKey createMacKey(String algorithm,
byte[] macKey)
getType
public String getType()
getHandle
public String getHandle()
getMacKey
public SecretKey getMacKey()
getExpiry
public Date getExpiry()
hasExpired
public boolean hasExpired()
sign
protected byte[] sign(byte[] data)
throws AssociationException
- Throws:
AssociationException
sign
public String sign(String text)
throws AssociationException
- Throws:
AssociationException
verifySignature
public boolean verifySignature(String text,
String signature)
throws AssociationException
- Throws:
AssociationException
Copyright © 2013 Sxip. All Rights Reserved.