|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.net.Authenticator
com.sshtools.ui.swing.PersistantAuthenticator
public class PersistantAuthenticator
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.net.Authenticator |
|---|
java.net.Authenticator.RequestorType |
| Constructor Summary | |
|---|---|
PersistantAuthenticator()
Creates a new GruntspudAuthenticator. |
|
| Method Summary | |
|---|---|
java.lang.Throwable |
getException()
Return the last exception |
javax.swing.Icon |
getIcon(java.lang.String scheme,
int iconSize)
|
int |
getIconSize()
|
java.awt.Component |
getParent()
Get the current parent component |
protected java.net.PasswordAuthentication |
getPasswordAuthentication()
|
PasswordPairList |
getPasswordPairList()
Return a list of all the password pairs |
char[] |
getPasswordSafeSecret(java.lang.String message,
java.lang.String text,
java.awt.Component parent)
Show a dialog asking for the password safe secret |
void |
init()
Initialise the authenticator. |
boolean |
isForceAskForPassword()
Get if the password will be asked for no matter what. |
void |
removePassword(PasswordPair pair)
Remove a password pair from the list. |
void |
setAllowEmptyPassword(boolean allowEmptyPassword)
|
static void |
setDirectory(java.io.File prefDir)
Set the directory where the passwords will be store |
void |
setEmphasisePrompt(boolean emphasisePrompt)
Set if the next request for a password should emphasise the 'prompt' field by colouring it red. |
void |
setForceAskForPassword(boolean forceAskForPassword)
Set whether the master password should be asked for if it is needed. |
void |
setIconSize(int iconSize)
|
void |
setInitialPassword(java.lang.String initialPassword)
Set the initial password. |
void |
setParentComponent(java.awt.Component parent)
Set the parent component to use as a parent for the modal authentication dialog (should it be displayed). |
void |
setUserName(java.lang.String userName)
Set the user name to use next time a password is requested |
char[][] |
showMasterPasswordConfirmationDialog(javax.swing.JComponent parent,
java.lang.String text,
java.lang.String title,
boolean checkAgainstOld)
Show a dialog asking the use for a new password safe secret. |
void |
updateUI()
|
| Methods inherited from class java.net.Authenticator |
|---|
getRequestingHost, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingScheme, getRequestingSite, getRequestingURL, getRequestorType, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, setDefault |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PersistantAuthenticator()
context - context
java.io.IOException| Method Detail |
|---|
public void setInitialPassword(java.lang.String initialPassword)
or a password has already been stored. The value
must be null to unset. The value is reset once the
authenticator has been used.
- Parameters:
initialPassword - initial password
public java.awt.Component getParent()
public static void setDirectory(java.io.File prefDir)
dir - directorypublic PasswordPairList getPasswordPairList()
public void removePassword(PasswordPair pair)
throws java.lang.Exception
pair -
java.lang.Exception
public void init()
throws java.io.IOException
context - context
java.io.IOException - if password list cannot be loaded
public char[][] showMasterPasswordConfirmationDialog(javax.swing.JComponent parent,
java.lang.String text,
java.lang.String title,
boolean checkAgainstOld)
null will be returned.
context - contextparent - parent componenttext - help texttitle - dialog titlecheckAgainstOld - make sure the old secret matches first
public char[] getPasswordSafeSecret(java.lang.String message,
java.lang.String text,
java.awt.Component parent)
message - message to showtext - textparent - parent component
null if aborted)public void setForceAskForPassword(boolean forceAskForPassword)
forceAskForPassword - always ask for the master password next time
it is neededpublic void setEmphasisePrompt(boolean emphasisePrompt)
emphasisePrompt - emphasis promptpublic void setParentComponent(java.awt.Component parent)
parent - parent componentpublic void setUserName(java.lang.String userName)
userName - user namepublic void updateUI()
public void setAllowEmptyPassword(boolean allowEmptyPassword)
protected java.net.PasswordAuthentication getPasswordAuthentication()
getPasswordAuthentication in class java.net.Authenticatorpublic void setIconSize(int iconSize)
public int getIconSize()
public javax.swing.Icon getIcon(java.lang.String scheme,
int iconSize)
public java.lang.Throwable getException()
public boolean isForceAskForPassword()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||