org.neuclear.commons.crypto.signers
Class ServletSignerFactory
java.lang.Object
org.neuclear.commons.crypto.signers.ServletSignerFactory
public final class ServletSignerFactory
- extends java.lang.Object
Used to create Signers from signers configuration parameters. It keeps a cache of Signers with similar parameters. Thus
if you have several Servlets with the same keystore parameters they will use the same instance of Signer
The Configuration parameters are as follows:
| parameter name | parameter value |
| keystore | The location of the JCE KeyStore. Defaults to the file .keystore in the users home directory
If you specify test the built in Test keystore will be used. |
| serviceid | The main service ID of the service. Ie. neu://superbux.com/ecurrency. This is only required (and used)
if you set keeppassphrase (see below) |
| passphraseagent | The type of passphraseagent to use. Valid options are signers,
gui(default) and console |
| keeppassphrase | This asks for the service passphrase once at startup and remembers it through the lifetime of the signers |
To use the factory. Do as follows within your servlets init() method:
Signer signer=ServletSignerFactory.getInstance().createSigner(config);
- See Also:
PassPhraseAgent,
Signer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
createSigner
public Signer createSigner(javax.servlet.ServletConfig config)
throws java.io.FileNotFoundException,
java.security.GeneralSecurityException,
NeuClearException
- Throws:
java.io.FileNotFoundException
java.security.GeneralSecurityException
NeuClearException
getInstance
public static ServletSignerFactory getInstance()
Copyright © 2003-2004 Antilles Software Ventures SA. All Rights Reserved.