Package net.handle.hdllib
Class PublicKeyAuthenticationInfo
- java.lang.Object
 - 
- net.handle.hdllib.AuthenticationInfo
 - 
- net.handle.hdllib.PublicKeyAuthenticationInfo
 
 
 
- 
public class PublicKeyAuthenticationInfo extends AuthenticationInfo
 
- 
- 
Constructor Summary
Constructors Constructor Description PublicKeyAuthenticationInfo(byte[] userIdHandle, int userIdIndex, java.security.PrivateKey privateKey) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]authenticate(ChallengeResponse challenge, AbstractRequest request)Sign the given nonce and requestDigest given as a challenge to the given request.booleanequals(java.lang.Object obj)byte[]getAuthType()Get the identifier for the type of authentication performed.java.security.PrivateKeygetPrivateKey()Return the byte-encoded representation of the secret key.byte[]getUserIdHandle()Get the handle that identifies the user that is represented by this authentication object.intgetUserIdIndex()Get the index of the handle value that identifies this user.inthashCode()java.lang.StringtoString()- 
Methods inherited from class net.handle.hdllib.AuthenticationInfo
getUserValueReference 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getAuthType
public byte[] getAuthType()
Get the identifier for the type of authentication performed. In this case, the authentication type is AT_SECRET_KEY.- Specified by:
 getAuthTypein classAuthenticationInfo
 
- 
authenticate
public byte[] authenticate(ChallengeResponse challenge, AbstractRequest request) throws HandleException
Sign the given nonce and requestDigest given as a challenge to the given request. The implementation of this method should also probably verify that the client did in fact send the specified request, and that the associated digest is a valid digest of the request.- Specified by:
 authenticatein classAuthenticationInfo- Returns:
 - a signature of the concatenation of nonce and requestDigest.
 - Throws:
 HandleException
 
- 
getUserIdHandle
public byte[] getUserIdHandle()
Get the handle that identifies the user that is represented by this authentication object.- Specified by:
 getUserIdHandlein classAuthenticationInfo
 
- 
getUserIdIndex
public int getUserIdIndex()
Get the index of the handle value that identifies this user. The returned index value of the handle that identifies this user should contain a value with a type (public key, secret key, etc) that corresponds to the way that this user is authenticating.- Specified by:
 getUserIdIndexin classAuthenticationInfo
 
- 
getPrivateKey
public java.security.PrivateKey getPrivateKey()
Return the byte-encoded representation of the secret key. 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
equals
public boolean equals(java.lang.Object obj)
- Overrides:
 equalsin classjava.lang.Object
 
 - 
 
 -