Node Director
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
sfi.director.util.Credentials Class Reference
Inheritance diagram for sfi.director.util.Credentials:
sfi.director.application.FrontendCredentials sfi.director.util.KnownCredentials

Public Member Functions

 Credentials ()
void invalidate ()
void setEntity (String entity)
String getEntity ()
void setPrincipalPrompt (String prompt)
void setPasswordPrompt (String prompt)
void setDefaultPrincipal (String login)
void askUser () throws DirectorException
 prompt the user for a principal and password
String getPrincipal () throws DirectorException
 get the principal ("Login") used for authentication.
String getPassword () throws DirectorException
 get the password used for authentication
boolean isCancelled ()
 determine if authentication has been cancelled

Static Public Member Functions

static void setMethod (Credentials cred)
static void setAppCredentialsFile (String filename)
static Credentials getCredentials (String entity) throws DirectorException
static void addFileCredentials (String fileName, String entity, String principal, String password) throws IOException
 stores credentials in a file within the credentials directory.
static void addRemoteHostPw (String login, String pw) throws DirectorException
 stores credentials for bootstrap invokers in temporary credentials file.

Static Public Attributes

static final String FILE_CREDENTIALS = "credentials"
static final String FILE_TMP_CREDENTIALS = "tmpcredentials"

Protected Member Functions

void fileCredentials ()
String findAuth (String principal)

Protected Attributes

String principalPrompt = "Login"
String passwordPrompt = "Password"
String principal
String password
String entity
boolean cancelled = false
boolean file_tried = false

Constructor & Destructor Documentation

sfi.director.util.Credentials.Credentials ( )

Member Function Documentation

static void sfi.director.util.Credentials.addFileCredentials ( String  fileName,
String  entity,
String  principal,
String  password 
) throws IOException
static

stores credentials in a file within the credentials directory.

Use FILE_CREDENTIALS and FILE_TMP_CREDENTIALS constants in preference to invent your own file names. Note that this procedure is not free of race conditions.

References sfi.director.util.Setup.configDomain, sfi.director.util.Credentials.entity, sfi.director.util.Setup.fileSeparator, sfi.director.util.Credentials.password, sfi.director.util.Credentials.principal, and sfi.director.util.Setup.rcdir.

Referenced by sfi.director.util.Credentials.addRemoteHostPw(), sfi.director.cli.storepassword.run(), and sfi.director.application.InstallerOpenLDAP.setRandomPassword().

static void sfi.director.util.Credentials.addRemoteHostPw ( String  login,
String  pw 
) throws DirectorException
static

stores credentials for bootstrap invokers in temporary credentials file.

Helper procedure.

Note
though this procedure accepts a login name and actually stores it, invokers may ignore it.

References sfi.director.util.Credentials.addFileCredentials(), and sfi.director.util.Credentials.FILE_TMP_CREDENTIALS.

Referenced by sfi.director.schedule.Scheduler.executeCmd(), and sfi.director.application.AdminServer.oneConnection().

void sfi.director.util.Credentials.askUser ( ) throws DirectorException

prompt the user for a principal and password

Reimplemented in sfi.director.application.FrontendCredentials.

References sfi.director.util.Credentials.password, and sfi.director.util.Credentials.principal.

void sfi.director.util.Credentials.fileCredentials ( )
protected
String sfi.director.util.Credentials.findAuth ( String  principal)
protected
static Credentials sfi.director.util.Credentials.getCredentials ( String  entity) throws DirectorException
static
String sfi.director.util.Credentials.getEntity ( )
String sfi.director.util.Credentials.getPassword ( ) throws DirectorException
String sfi.director.util.Credentials.getPrincipal ( ) throws DirectorException
void sfi.director.util.Credentials.invalidate ( )
boolean sfi.director.util.Credentials.isCancelled ( )
static void sfi.director.util.Credentials.setAppCredentialsFile ( String  filename)
static
void sfi.director.util.Credentials.setDefaultPrincipal ( String  login)
void sfi.director.util.Credentials.setEntity ( String  entity)
static void sfi.director.util.Credentials.setMethod ( Credentials  cred)
static
void sfi.director.util.Credentials.setPasswordPrompt ( String  prompt)
void sfi.director.util.Credentials.setPrincipalPrompt ( String  prompt)

Member Data Documentation

boolean sfi.director.util.Credentials.cancelled = false
protected
String sfi.director.util.Credentials.entity
protected
final String sfi.director.util.Credentials.FILE_CREDENTIALS = "credentials"
static
final String sfi.director.util.Credentials.FILE_TMP_CREDENTIALS = "tmpcredentials"
static
boolean sfi.director.util.Credentials.file_tried = false
protected
String sfi.director.util.Credentials.password
protected
String sfi.director.util.Credentials.passwordPrompt = "Password"
protected
String sfi.director.util.Credentials.principal
protected
String sfi.director.util.Credentials.principalPrompt = "Login"
protected

The documentation for this class was generated from the following file: