Package xal.rbac

Class Credentials

java.lang.Object
xal.rbac.Credentials

public class Credentials extends Object
Credentials carry the login information. They are created by the SecurityCallback during the authentication and are discarded immediately afterwards.
Author:
Jakob Battelino Prelog
  • Constructor Details

    • Credentials

      public Credentials(String username, char[] password)
      Constructs new Credentials. Preferred role and IP are set to null.
      Parameters:
      username - the username used for authentication
      password - the password used for authentication
    • Credentials

      public Credentials(String username, char[] password, String preferredRole)
      Constructs new credentials with fields set to the provided values. IP is set to null.
      Parameters:
      username - that will be used for authentication.
      password - that will be used for authentication.
      preferredRole - the user would prefer to have.
    • Credentials

      public Credentials(String username, char[] password, String preferredRole, String ip)
      Constructs new credentials with fields set to the provided values.
      Parameters:
      username - that will be used for authentication.
      password - that will be used for authentication.
      preferredRole - the user would prefer to have.
      ip - address that will be used for authentication.
  • Method Details

    • getUsername

      public String getUsername()
      Returns username that will be used for authentication.
      Returns:
      username that will be used for authentication.
    • getPassword

      public char[] getPassword()
      Returns password that will be used for authentication.
      Returns:
      password that will be used for authentication.
    • getPreferredRole

      public String getPreferredRole()
      Returns the name of the role the user would prefer to have.
      Returns:
      the name of the role the user would prefer to have.
    • getIP

      public String getIP()
      Returns IP address that will be used for authentication.
      Returns:
      IP address that will be used for authentication.