de.deepamehta.core.service.accesscontrol
Class Credentials

Show UML class diagram
java.lang.Object
  extended by de.deepamehta.core.service.accesscontrol.Credentials

public class Credentials
extends Object

A pair of username and SHA256 encoded password.


Field Summary
private static String ENCODED_PASSWORD_PREFIX
           
 String password
           
 String username
           
 
Constructor Summary
Credentials(org.codehaus.jettison.json.JSONObject cred)
          Note: invoked from JAX-RS message body reader (see Webservice's ObjectProvider.java).
Credentials(String authHeader)
           
Credentials(String username, String password)
           
 
Method Summary
private  String encodePassword(String password)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ENCODED_PASSWORD_PREFIX

private static final String ENCODED_PASSWORD_PREFIX
See Also:
Constant Field Values

username

public String username

password

public String password
Constructor Detail

Credentials

public Credentials(String username,
                   String password)
Parameters:
password - as plain text

Credentials

public Credentials(org.codehaus.jettison.json.JSONObject cred)
Note: invoked from JAX-RS message body reader (see Webservice's ObjectProvider.java).

Parameters:
cred - A JSON object with 2 properties: "username" and "password". The password is expected to be SHA256 encoded.

Credentials

public Credentials(String authHeader)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

encodePassword

private String encodePassword(String password)


Copyright © 2015. All Rights Reserved.