org.neuclear.commons.crypto.signers
Class ServletSignerFactory

java.lang.Object
  extended by 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 nameparameter value
keystoreThe 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.
serviceidThe main service ID of the service. Ie. neu://superbux.com/ecurrency. This is only required (and used) if you set keeppassphrase (see below)
passphraseagentThe type of passphraseagent to use. Valid options are signers, gui(default) and console
keeppassphraseThis 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

Method Summary
 Signer createSigner(javax.servlet.ServletConfig config)
           
static ServletSignerFactory getInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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.