Package gda.jython.authenticator
Class UserAuthentication
java.lang.Object
gda.jython.authenticator.UserAuthentication
Class to hold user credentials.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic Stringstatic Stringstatic booleanstatic booleanstatic booleanstatic voidsetToNotUseOSAuthentication(String username, String password) static voidSet to use OSAuthenitcation
-
Constructor Details
-
UserAuthentication
public UserAuthentication()
-
-
Method Details
-
isAuthInfoSupplied
public static boolean isAuthInfoSupplied()- Returns:
- Flag to indicate if the values are those entered by the user
-
isUseOSAuthentication
public static boolean isUseOSAuthentication()- Returns:
- Flag to indicate if the user is the value obtained from System.getProperty("user.name") in which case the password is empty
-
getUsername
-
getPassword
- Returns:
- Password - non-empty if isUseOSAuthentication returns false
-
setToUseOSAuthentication
public static void setToUseOSAuthentication()Set to use OSAuthenitcation -
clearValues
public static void clearValues() -
setToNotUseOSAuthentication
-
isAuthenticated
- Returns:
- true if the user is authenticated
- Throws:
Exception- - if an exception during authentication
-