Interface ILcdPasswordProvider


public interface ILcdPasswordProvider
This interface provides methods for retrieving a user and a password. Users and passwords are defined within realms. These realms are defined by the application, e.g. "sales", "development", or "web pages".

Implementations can hard-code the user and password pairs, obtain them from a file, obtain them through a user dialog, etc. Implementations can cache the obtained values, although one should be careful not to introduce security risks.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    forgetPassword(String aRealm, String aUser)
    Resets the password for the given user within the given realm.
    getPassword(String aRealm, String aUser)
    Gets the password for the given user within the given realm.
    getUser(String aRealm)
    Gets the user name for the given realm.
  • Method Details

    • getUser

      String getUser(String aRealm)
      Gets the user name for the given realm.
      Parameters:
      aRealm - the context for which a user/password is required.
      Returns:
      a user name, or null if the implementation cannot supply one.
    • getPassword

      String getPassword(String aRealm, String aUser)
      Gets the password for the given user within the given realm.
      Parameters:
      aRealm - the context for which a user/password is required.
      aUser - a user name that was previously returned by the getUser(String) method.
      Returns:
      a password, or null if the implementation cannot supply one.
    • forgetPassword

      void forgetPassword(String aRealm, String aUser)
      Resets the password for the given user within the given realm. An application can call this method when it discovers that a previously supplied password was incorrect, so the ILcdPasswordProvider clears any cache it has and tries to obtain a new password next time.
      Parameters:
      aRealm - the context for which a user/password is required.
      aUser - a user name that was previously returned by the getUser(String) method.