public class SnsMessageResource extends Object
SnsHttpDelegate
being
configured to accept inbound messages from a remote device over SNS. Converts messages that come in
from an SNS-specific format into a generalised one that the Push auth system and message dispatcher can use.
The registration field is special, as it communicates out with Amazon's SNS to ensure that the registration
is successfully completed.
This endpoint will receive both authentication and registration messages. The format of these messages will be:
{
"jwt" : "...", // signed jwt, including all claims necessary for operation (reg or auth)
"messageId" : "..." // unique identifier for this message
}
SnsHttpDelegate
.
PushNotificationService
.Constructor and Description |
---|
SnsMessageResource(CTSPersistentStore coreTokenService,
PushNotificationService pushNotificationService,
JSONSerialisation jsonSerialisation,
Debug debug,
org.forgerock.json.jose.common.JwtReconstruction jwtReconstruction)
Generate a new SnsMessageResource using the provided MessageDispatcher.
|
Modifier and Type | Method and Description |
---|---|
org.forgerock.util.promise.Promise<org.forgerock.json.resource.ActionResponse,org.forgerock.json.resource.ResourceException> |
authenticate(org.forgerock.services.context.Context context,
org.forgerock.json.resource.ActionRequest actionRequest)
Forwards the provided message - so long as it has a messageId in the appropriate place - to the
messageDispatcher which is responsible for informing the appropriate receiver in OpenAM of the
data received in the message.
|
org.forgerock.util.promise.Promise<org.forgerock.json.resource.ActionResponse,org.forgerock.json.resource.ResourceException> |
register(org.forgerock.services.context.Context context,
org.forgerock.json.resource.ActionRequest actionRequest)
For a registration message - determines the type of remote OS and registers the device
with Amazon SNS.
|
@Inject public SnsMessageResource(CTSPersistentStore coreTokenService, PushNotificationService pushNotificationService, JSONSerialisation jsonSerialisation, @Named(value="frPush") Debug debug, org.forgerock.json.jose.common.JwtReconstruction jwtReconstruction)
coreTokenService
- A copy of the core token services - messages are dropped on to this for use in clustered
environments.pushNotificationService
- Used to get the message dispatcher, usde to deliver messages received at this
endpoint to their appropriate locations within OpenAM.jsonSerialisation
- Used to perform the serialisation necessary for inserting tokens into the CTS.debug
- For writing out debug messages.jwtReconstruction
- For recreating JWTs.public org.forgerock.util.promise.Promise<org.forgerock.json.resource.ActionResponse,org.forgerock.json.resource.ResourceException> authenticate(org.forgerock.services.context.Context context, org.forgerock.json.resource.ActionRequest actionRequest)
context
- Context of this request used to retrieve the current realm location.actionRequest
- The request triggering the dispatch.public org.forgerock.util.promise.Promise<org.forgerock.json.resource.ActionResponse,org.forgerock.json.resource.ResourceException> register(org.forgerock.services.context.Context context, org.forgerock.json.resource.ActionRequest actionRequest)
context
- Context of this request used to retrieve the current realm location.actionRequest
- The request triggering the dispatch.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.