Class Credentials
- java.lang.Object
-
- systems.dmx.core.service.accesscontrol.Credentials
-
public class Credentials extends Object
A pair of username and password (plain text).
-
-
Constructor Summary
Constructors Constructor Description Credentials(String authHeader)
Constructs Credentials from a request's Authorization header.Credentials(String username, String password)
Standard constructor.Credentials(org.codehaus.jettison.json.JSONObject cred)
Constructs Credentials from a JSON object.
-
-
-
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.
-
-