Class TwoFADevicesResource<T extends UserDevicesDao>
- java.lang.Object
-
- org.forgerock.openam.rest.SubjectAwareResource
-
- org.forgerock.openam.rest.RealmAwareResource
-
- org.forgerock.openam.core.rest.devices.UserDevicesResource<T>
-
- org.forgerock.openam.core.rest.devices.TwoFADevicesResource<T>
-
- Type Parameters:
T- the type ofUserDevicesDaoused to access the user's devices
- All Implemented Interfaces:
org.forgerock.json.resource.CollectionResourceProvider
- Direct Known Subclasses:
OathDevicesResource,PushDevicesResource
public abstract class TwoFADevicesResource<T extends UserDevicesDao> extends UserDevicesResource<T>
Abstract sub-implementation of the UserDevicesResource. A TwoFADevice must have the ability to skip the module, if desired by the user and the configuration of that server allows it.
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringCHECKprotected static StringRESETprotected static StringRESULTprotected static StringSKIPprotected static StringVALUE-
Fields inherited from class org.forgerock.openam.core.rest.devices.UserDevicesResource
contextHelper, userDevicesDao
-
Fields inherited from class org.forgerock.openam.rest.RealmAwareResource
EMPTY
-
-
Constructor Summary
Constructors Constructor Description TwoFADevicesResource(T userDevicesDao, ContextHelper helper)Constructs a new UserDevicesResource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.forgerock.json.resource.ResourceResponseconvertValue(org.forgerock.json.JsonValue queryResult)protected AMIdentitygetUserIdFromUri(org.forgerock.services.context.Context context)Retrieving the user id in this fashion ensures that an admin can utilise these functions.-
Methods inherited from class org.forgerock.openam.core.rest.devices.UserDevicesResource
actionCollection, actionInstance, createInstance, deleteInstance, patchInstance, queryCollection, readInstance, updateInstance
-
Methods inherited from class org.forgerock.openam.rest.RealmAwareResource
getRealm
-
Methods inherited from class org.forgerock.openam.rest.SubjectAwareResource
getContextSubject
-
-
-
-
Field Detail
-
SKIP
protected static final String SKIP
- See Also:
- Constant Field Values
-
CHECK
protected static final String CHECK
- See Also:
- Constant Field Values
-
VALUE
protected static final String VALUE
- See Also:
- Constant Field Values
-
RESULT
protected static final String RESULT
- See Also:
- Constant Field Values
-
RESET
protected static final String RESET
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TwoFADevicesResource
public TwoFADevicesResource(T userDevicesDao, ContextHelper helper)
Constructs a new UserDevicesResource.- Parameters:
userDevicesDao- An instance of theUserDevicesDao.helper- An instance of theContextHelper.
-
-
Method Detail
-
convertValue
protected org.forgerock.json.resource.ResourceResponse convertValue(org.forgerock.json.JsonValue queryResult) throws ParseException- Specified by:
convertValuein classUserDevicesResource<T extends UserDevicesDao>- Throws:
ParseException
-
getUserIdFromUri
protected AMIdentity getUserIdFromUri(org.forgerock.services.context.Context context) throws org.forgerock.json.resource.InternalServerErrorException
Retrieving the user id in this fashion ensures that an admin can utilise these functions.- Throws:
org.forgerock.json.resource.InternalServerErrorException
-
-