public class PKAuthentication extends AbstractAuthentication
Constructor and Description |
---|
PKAuthentication(java.lang.String myID,
java.security.PrivateKey myKey)
Construct an authentication object that uses the given
private key to prove that we are the entity identified
by myID.
|
Modifier and Type | Method and Description |
---|---|
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.lang.String |
getID()
Returns the identifier representing the entity that is supposed
to be authenticated by this object.
|
static java.lang.String |
getSigAlgForKeyAlg(java.lang.String keyAlg) |
void |
initialize() |
static PKAuthentication |
readPKAuthenticationFromFile(java.lang.String myID,
java.lang.String privateKeyFile,
java.lang.String passphrase)
Convenience method to read a private key from a file, decrypt that key with the given passphrase and
return a PKAuthentication object for the given ID.
|
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() |
getAnonymousAuth, getCredentials, setAutoRetrieveCredentials, setCredentials
public PKAuthentication(java.lang.String myID, java.security.PrivateKey myKey)
public net.handle.hdllib.AuthenticationInfo toHandleAuth()
public java.lang.String getID()
DOAuthentication.getID()
public AbstractAuthentication cloneAuthentication()
cloneAuthentication
in class AbstractAuthentication
public static final PKAuthentication readPKAuthenticationFromFile(java.lang.String myID, java.lang.String privateKeyFile, java.lang.String passphrase) throws java.lang.Exception
java.lang.Exception
public void initialize() throws java.lang.Exception
java.lang.Exception
public void signChallenge(HeaderSet challenge, HeaderSet response) throws java.lang.Exception
DOAuthentication
java.lang.Exception
public static final java.lang.String getSigAlgForKeyAlg(java.lang.String keyAlg)
public java.lang.String toString()
toString
in class java.lang.Object