org.rhq.core.domain.auth
Class Principal
java.lang.Object
org.rhq.core.domain.auth.Principal
- All Implemented Interfaces:
- Serializable
public class Principal
- extends Object
- implements Serializable
- See Also:
- Serialized Form
QUERY_FIND_BY_USERNAME
public static final String QUERY_FIND_BY_USERNAME
- See Also:
- Constant Field Values
QUERY_FIND_ALL_USERS
public static final String QUERY_FIND_ALL_USERS
- See Also:
- Constant Field Values
Principal
public Principal()
Principal
public Principal(String principal,
String password_md5)
- Constructor for
Principal
. Note that the password_md5
is not the actual password string; it
must be the MD5 hash of the password. See setPassword(String)
.
- Parameters:
principal
- password_md5
-
getId
public int getId()
getPrincipal
public String getPrincipal()
setPrincipal
public void setPrincipal(String principal)
getPassword
public String getPassword()
- Returns the principal password's MD5 hash. The password itself is never persisted.
- Returns:
- the password's MD5 hashcode
setPassword
public void setPassword(String password_md5)
- Sets the principal password's MD5 hash. Do not pass in the actual password itself, the caller must pass in an MD5
hash that was generated from the actual password string using something like:
org.jboss.security.Util.createPasswordHash("MD5", "base64", null, null, password);
- Parameters:
password_md5
- the MD5 hash representing the actual password
toString
public String toString()
- Overrides:
toString
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.