net.cnri.dobj
Class SecretKeyAuthentication

java.lang.Object
  extended by net.cnri.dobj.AbstractAuthentication
      extended by net.cnri.dobj.SecretKeyAuthentication
All Implemented Interfaces:
DOAuthentication

public class SecretKeyAuthentication
extends AbstractAuthentication

A PKAuthentication object uses a secret key to prove our identity. The certificate credentials are handled as part of the AbstractAuthentication parent class.


Constructor Summary
SecretKeyAuthentication(java.lang.String myID, byte[] secretKey)
          Construct an authentication object that uses the given private key to prove that we are the entity identified by myID.
 
Method Summary
 AbstractAuthentication cloneAuthentication()
          The following must be implemented by subclasses of AbstractAuthentication in order to provide a copy of themselves for the purposes of authenticating when retrieving their credentials.
 java.security.cert.Certificate[] getCredentials()
          Retrieve the credentials from this user's digital object so that they can be presented to any servers during authentication.
 java.lang.String getID()
          Returns the identifier representing the entity that is supposed to be authenticated by this object.
 void signChallenge(HeaderSet challenge, HeaderSet response)
          Signs the given challenge message and puts the result (including any required parameters) into the given HeaderSet object.
 net.handle.hdllib.AuthenticationInfo toHandleAuth()
          Returns this authentication in a form that will work with handle system administration.
 java.lang.String toString()
           
 
Methods inherited from class net.cnri.dobj.AbstractAuthentication
getAnonymousAuth, setAutoRetrieveCredentials, setCredentials
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SecretKeyAuthentication

public SecretKeyAuthentication(java.lang.String myID,
                               byte[] secretKey)
Construct an authentication object that uses the given private key to prove that we are the entity identified by myID.

Method Detail

toHandleAuth

public net.handle.hdllib.AuthenticationInfo toHandleAuth()
Returns this authentication in a form that will work with handle system administration.


cloneAuthentication

public AbstractAuthentication cloneAuthentication()
The following must be implemented by subclasses of AbstractAuthentication in order to provide a copy of themselves for the purposes of authenticating when retrieving their credentials. The returned object will have the autoRetrieveCredentials option turned off when retrieving the credentials in order to avoid a recursive loop when authenticating with the server that holds the credentials.

Specified by:
cloneAuthentication in class AbstractAuthentication

getID

public java.lang.String getID()
Returns the identifier representing the entity that is supposed to be authenticated by this object.

See Also:
DOAuthentication.getID()

signChallenge

public void signChallenge(HeaderSet challenge,
                          HeaderSet response)
                   throws java.lang.Exception
Description copied from interface: DOAuthentication
Signs the given challenge message and puts the result (including any required parameters) into the given HeaderSet object.

Throws:
java.lang.Exception

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getCredentials

public java.security.cert.Certificate[] getCredentials()
Retrieve the credentials from this user's digital object so that they can be presented to any servers during authentication.

Specified by:
getCredentials in interface DOAuthentication
Overrides:
getCredentials in class AbstractAuthentication