public class UserProfile extends Object
Constructor and Description |
---|
UserProfile(JsonValue rawInfo)
Constructor taking the raw
JsonValue . |
Modifier and Type | Method and Description |
---|---|
JsonValue |
asRawJson()
Get the raw JSON representation as a
JsonValue . |
String |
getCommonName()
Get the common name (cn) or
null if none. |
String |
getDistinguishedName()
Get the user's distinguished name (dn) or
null if none. |
String |
getRealm()
Get the user's realm or
null if none. |
String |
getUsername()
Get the user's username.
|
Map<String,Object> |
rawInfo()
Returns the unmodifiable
Map of the user profile info, not null . |
static String |
unwrap(JsonValue config,
String key)
Utility method to unwrap a profile attribute that is wrapped in a JSON array.
|
public static String unwrap(JsonValue config, String key)
{ "cn": [ "foo" ] } ==> foo
config
- The JsonValue node holding the datakey
- The attribute that holds the multivalued data as an arraypublic String getUsername()
public String getRealm()
null
if none.null
if none.public String getDistinguishedName()
null
if none.null
if none.public String getCommonName()
null
if none.null
if none.public Map<String,Object> rawInfo()
Map
of the user profile info, not null
.Map
of the user profile info, not null
.Copyright 2011-2017 ForgeRock AS.