|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jpl.mipl.mdms.FileService.komodo.util.UserAuthenticator
public class UserAuthenticator
Purpose: Utility class that performs user authentication for a filetype or, more generally, a server group. Prior to this class, the only way to verify a user has access was to perform a connection to a filetype. This utility offers to ability to confirm authentication prior to that step.
Copyright 2005, California Institute of Technology. ALL RIGHTS RESERVED. U.S. Government Sponsorship acknowledge. 2005.
============================================================================ Modification History : ---------------------- Date Who What ---------------------------------------------------------------------------- 10/12/2005 Nick Initial Release 10/19/2005 Nick Added unknwnCmdOp field to handle older servers oblivious to authentication API ============================================================================
Field Summary | |
---|---|
protected URL |
_domainFile
|
protected String |
_password
|
protected int |
_security
|
protected int |
_unknownCmdOperation
|
protected String |
_username
|
static int |
UNKNOWN_COMMAND_WILL_FAIL
Results with errno representing unknown/unrecognized commands will be treated as if the authentication failed. |
static int |
UNKNOWN_COMMAND_WILL_PASS
Results with errno representing unknown/unrecognized commands will be treated as if the authentication succeeded. |
Constructor Summary | |
---|---|
UserAuthenticator(String domainFile)
Constructor. |
|
UserAuthenticator(String domainFile,
int security)
Constructor. |
|
UserAuthenticator(URL domainFile)
Constructor. |
|
UserAuthenticator(URL domainFile,
int security)
Constructor. |
Method Summary | |
---|---|
boolean |
authenticate(String user,
String pwd,
String groupName,
String ftName)
Perform an authentication procedure for a (user,pwd) and a servergroup. |
int |
getUnknownCommandOperation()
Return ths current operation option for situation where server returns with 'unknown operation' message. |
void |
setUnknownCommandOperation(int operationId)
Sets the operation option for case where server replies with an 'unknown operation' message, which usually denotes a server running an older version of the FEI protocol. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int UNKNOWN_COMMAND_WILL_PASS
public static final int UNKNOWN_COMMAND_WILL_FAIL
protected URL _domainFile
protected int _security
protected String _username
protected String _password
protected int _unknownCmdOperation
Constructor Detail |
---|
public UserAuthenticator(String domainFile) throws SessionException
domainFile
- Path of FEI domain file
SessionException
public UserAuthenticator(String domainFile, int security) throws SessionException
domainFile
- Path of FEI domain filesecurity
- Security option for connection
SessionException
public UserAuthenticator(URL domainFile) throws SessionException
domainFile
- Path of FEI domain filesecurity
- Security option for connection
SessionException
public UserAuthenticator(URL domainFile, int security) throws SessionException
domainFile
- Path of FEI domain filesecurity
- Security option for connection
SessionException
Method Detail |
---|
public boolean authenticate(String user, String pwd, String groupName, String ftName) throws SessionException
user
- User name, cannot be null.pwd
- User password, cannot be null.groupName
- Name of server group, cannot be null.ftName
- Name of filetype, can be null.
SessionException
- if session error occurs during
authentication.public void setUnknownCommandOperation(int operationId)
operationId
- One of UserAuthentication.UNKNOWN_COMMAND_WILL_{FAIL|PASS}.public int getUnknownCommandOperation()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |