public class PersistantAuthenticator extends Authenticator
Authenticator.RequestorType| Constructor and Description |
|---|
PersistantAuthenticator()
Creates a new GruntspudAuthenticator.
|
| Modifier and Type | Method and Description |
|---|---|
Throwable |
getException()
Return the last exception
|
Icon |
getIcon(String scheme,
int iconSize) |
int |
getIconSize() |
Component |
getParent()
Get the current parent component
|
protected PasswordAuthentication |
getPasswordAuthentication() |
PasswordPairList |
getPasswordPairList()
Return a list of all the password pairs
|
char[] |
getPasswordSafeSecret(String message,
String text,
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(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(String initialPassword)
Set the initial password.
|
void |
setParentComponent(Component parent)
Set the parent component to use as a parent for the modal authentication
dialog (should it be displayed).
|
void |
setUserName(String userName)
Set the user name to use next time a password is requested
|
char[][] |
showMasterPasswordConfirmationDialog(JComponent parent,
String text,
String title,
boolean checkAgainstOld)
Show a dialog asking the use for a new password safe secret.
|
void |
updateUI() |
getRequestingHost, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingScheme, getRequestingSite, getRequestingURL, getRequestorType, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, setDefaultpublic PersistantAuthenticator()
context - contextIOExceptionpublic void setInitialPassword(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. initialPassword - initial passwordpublic Component getParent()
public static void setDirectory(File prefDir)
dir - directorypublic PasswordPairList getPasswordPairList()
public void removePassword(PasswordPair pair) throws Exception
pair - Exceptionpublic void init()
throws IOException
context - contextIOException - if password list cannot be loadedpublic char[][] showMasterPasswordConfirmationDialog(JComponent parent, String text, String title, boolean checkAgainstOld)
null will be returned.context - contextparent - parent componenttext - help texttitle - dialog titlecheckAgainstOld - make sure the old secret matches firstpublic char[] getPasswordSafeSecret(String message, String text, Component parent)
message - message to showtext - textparent - parent componentnull 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(Component parent)
parent - parent componentpublic void setUserName(String userName)
userName - user namepublic void updateUI()
public void setAllowEmptyPassword(boolean allowEmptyPassword)
protected PasswordAuthentication getPasswordAuthentication()
getPasswordAuthentication in class Authenticatorpublic void setIconSize(int iconSize)
public int getIconSize()
public Throwable getException()
public boolean isForceAskForPassword()
Copyright © 2021. All rights reserved.