|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.ThreadLocal
org.neuclear.commons.crypto.passphraseagents.ServletPassPhraseAgent
public class ServletPassPhraseAgent
PassPhraseAgent for use in server environments. You set the passphrase first by passing it a signers request. It fetches the passphrase from the paramater "passphrase"
WARNING The sequence of events is very important for the safe usage of this. The following is an example within a standard doPost() method.
Signer| Constructor Summary | |
|---|---|
ServletPassPhraseAgent()
|
|
| Method Summary | |
|---|---|
void |
clear()
Clears the passphrase. |
char[] |
getNewPassPhrase(java.lang.String name)
|
java.io.File |
getOpenFileName(java.lang.String title,
java.lang.String def)
|
char[] |
getPassPhrase(BrowsableSigner signer)
The User is asked to pick a name by the PassPhraseAgent. |
char[] |
getPassPhrase(java.lang.String name)
Gets the passphrase if set or null |
char[] |
getPassPhrase(java.lang.String name,
boolean incorrect)
|
java.io.File |
getSaveToFileName(java.lang.String title,
java.lang.String def)
|
void |
setRequest(javax.servlet.http.HttpServletRequest request)
Set the passphrase from the request object. |
byte[] |
sign(BrowsableSigner signer,
byte[] data,
SetPublicKeyCallBack callback)
The User is asked to pick a name by the PassPhraseAgent. |
| Methods inherited from class java.lang.ThreadLocal |
|---|
get, initialValue, remove, set |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServletPassPhraseAgent()
| Method Detail |
|---|
public void setRequest(javax.servlet.http.HttpServletRequest request)
request - public char[] getPassPhrase(java.lang.String name)
getPassPhrase in interface PassPhraseAgentname -
public void clear()
public char[] getPassPhrase(java.lang.String name,
boolean incorrect)
throws UserCancellationException
getPassPhrase in interface PassPhraseAgentUserCancellationException
public char[] getPassPhrase(BrowsableSigner signer)
throws UserCancellationException
UserCancellationException
public byte[] sign(BrowsableSigner signer,
byte[] data,
SetPublicKeyCallBack callback)
throws UserCancellationException
sign in interface InteractiveAgentUserCancellationException
public java.io.File getSaveToFileName(java.lang.String title,
java.lang.String def)
throws UserCancellationException
getSaveToFileName in interface InteractiveAgentUserCancellationException
public java.io.File getOpenFileName(java.lang.String title,
java.lang.String def)
throws UserCancellationException
getOpenFileName in interface InteractiveAgentUserCancellationException
public char[] getNewPassPhrase(java.lang.String name)
throws UserCancellationException
getNewPassPhrase in interface InteractiveAgentUserCancellationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||