public final class IdentityRestUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
AGENT_TYPE |
static String |
FIELD_MAIL |
static String |
GROUP_TYPE |
static String |
REALM |
static String |
UNIVERSAL_ID |
static String |
USER_KBA_ATTRIBUTE |
static String |
USER_TYPE |
static String |
USERNAME |
Modifier and Type | Method and Description |
---|---|
static void |
changeMemberships(org.forgerock.services.context.Context serverContext,
String realm,
String username,
Set<String> groupNames) |
static void |
changePassword(org.forgerock.services.context.Context serverContext,
String realm,
String username,
String oldPassword,
String newPassword) |
static void |
enforceWhiteList(org.forgerock.services.context.Context context,
org.forgerock.json.JsonValue jsonValue,
String objectType,
Set<String> validUserAttributes)
When an instance of a user is created via self service, we impose additional rules for security purposes.
|
static Map<String,Set<String>> |
getIdentityServicesAttributes(String realm,
String objectType) |
static SSOToken |
getSSOToken(String ssoTokenId) |
static org.forgerock.json.JsonValue |
identityDetailsToJsonValue(IdentityDetails details)
Convert an
IdentityDetails object into a JsonValue . |
static boolean |
isUserActive(String uid)
Uses an amAdmin SSOtoken to create an AMIdentity from the UID provided and checks
whether the AMIdentity in context is active/inactive
|
static IdentityDetails |
jsonValueToIdentityDetails(String objectType,
org.forgerock.json.JsonValue jVal,
String realm)
Returns an IdentityDetails from a JsonValue.
|
public static final String USER_TYPE
public static final String GROUP_TYPE
public static final String AGENT_TYPE
public static final String UNIVERSAL_ID
public static final String FIELD_MAIL
public static final String REALM
public static final String USER_KBA_ATTRIBUTE
public static final String USERNAME
public static void changePassword(org.forgerock.services.context.Context serverContext, String realm, String username, String oldPassword, String newPassword) throws org.forgerock.json.resource.ResourceException
org.forgerock.json.resource.ResourceException
public static void changeMemberships(org.forgerock.services.context.Context serverContext, String realm, String username, Set<String> groupNames) throws org.forgerock.json.resource.ResourceException
org.forgerock.json.resource.ResourceException
public static Map<String,Set<String>> getIdentityServicesAttributes(String realm, String objectType)
public static SSOToken getSSOToken(String ssoTokenId) throws SSOException
SSOException
public static org.forgerock.json.JsonValue identityDetailsToJsonValue(IdentityDetails details)
IdentityDetails
object into a JsonValue
. Package private for IdentityResourceV2.details
- The IdentityDetailspublic static void enforceWhiteList(org.forgerock.services.context.Context context, org.forgerock.json.JsonValue jsonValue, String objectType, Set<String> validUserAttributes) throws org.forgerock.json.resource.BadRequestException
context
- The contextjsonValue
- The requestobjectType
- The type of object we're creating, user, group, etc.validUserAttributes
- The set of valid user attributesorg.forgerock.json.resource.BadRequestException
- If any attribute is found in the JSON representation of the user object containing
an attribute that is not in our whitelistpublic static IdentityDetails jsonValueToIdentityDetails(String objectType, org.forgerock.json.JsonValue jVal, String realm)
objectType
- the object type, eg. user, group, etc.jVal
- The JsonValue Object to be convertedrealm
- The realmpublic static boolean isUserActive(String uid) throws org.forgerock.json.resource.NotFoundException
uid
- the universal identifier of the userorg.forgerock.json.resource.NotFoundException
- invalid SSOToken, invalid UIDCopyright © 2010–2025 Open Identity Platform Community. All rights reserved.