Class Credentials


  • public class Credentials
    extends Object
    A pair of username and password (plain text).
    • Field Detail

      • username

        public String username
      • password

        public String password
      • methodName

        public String methodName
    • Constructor Detail

      • Credentials

        public Credentials​(String username,
                           String password)
        Standard constructor. Used e.g. when creating an user account programmatically (via migration or plugin).
        Parameters:
        password - as plain text
      • Credentials

        public Credentials​(org.codehaus.jettison.json.JSONObject cred)
        Constructs Credentials from a JSON object. Note: invoked from JAX-RS message body reader (see Webservice's ObjectProvider.java). Used e.g. when an user account is created interactively (via Webclient).
        Parameters:
        cred - A JSON object with 2 properties: "username" and "password". The password is expected to be plain text.
      • Credentials

        public Credentials​(String authHeader)
        Constructs Credentials from a request's Authorization header.