Class UserAuthentication

java.lang.Object
gda.jython.authenticator.UserAuthentication

public class UserAuthentication extends Object
Class to hold user credentials.
  • 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

      public static String getUsername()
    • getPassword

      public static String getPassword()
      Returns:
      Password - non-empty if isUseOSAuthentication returns false
    • setToUseOSAuthentication

      public static void setToUseOSAuthentication()
      Set to use OSAuthenitcation
    • clearValues

      public static void clearValues()
    • setToNotUseOSAuthentication

      public static void setToNotUseOSAuthentication(String username, String password)
    • isAuthenticated

      public static boolean isAuthenticated() throws Exception
      Returns:
      true if the user is authenticated
      Throws:
      Exception - - if an exception during authentication