Class TSLoginContext

java.lang.Object
com.sun.ts.lib.porting.TSLoginContext
All Implemented Interfaces:
TSLoginContextInterface

public class TSLoginContext extends Object implements TSLoginContextInterface
TSLoginContext provides the implementation specific code for allowing a program to login as a specific user. This class is implemented as a wrapper class around Sun's login implementation code.
  • Constructor Details

    • TSLoginContext

      public TSLoginContext() throws Exception
      Provides the LoginContext needed to perform a login.
      Throws:
      Exception
    • TSLoginContext

      public TSLoginContext(String sClassName) throws Exception
      Provides the LoginContext needed to perform a login.
      Throws:
      Exception
  • Method Details

    • login

      public void login(String usr, String pwd) throws Exception
      Performs the login functionality.
      Specified by:
      login in interface TSLoginContextInterface
      Parameters:
      usr - the username to login
      pwd - the password of user
      Throws:
      Exception
    • login

      public void login(String useralias) throws Exception
      This login method is used for certificate based login Note: This method also uses keystore and keystore password from the TS configuration file
      Specified by:
      login in interface TSLoginContextInterface
      Parameters:
      useralias - - alias is used to pick up the certificate from keystore
      Throws:
      Exception
    • login

      public void login(String useralias, String keystore, String keyPass) throws Exception
      This login method is used for certificate based login
      Specified by:
      login in interface TSLoginContextInterface
      Parameters:
      useralias - - alias used to pickup the certificate from keystore
      keystore - - keystore file
      keyPass - - keystore password
      Throws:
      Exception
    • logout

      public Boolean logout()
      Performs logout.
      Specified by:
      logout in interface TSLoginContextInterface