Class EventVerifier
- java.lang.Object
-
- com.adobe.aio.event.webhook.service.EventVerifier
-
public class EventVerifier extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
ADOBE_IOEVENTS_DIGI_SIGN_1
static String
ADOBE_IOEVENTS_DIGI_SIGN_2
static String
ADOBE_IOEVENTS_PUB_KEY_1_PATH
static String
ADOBE_IOEVENTS_PUB_KEY_2_PATH
static String
ADOBE_IOEVENTS_SECURITY_DOMAIN
static String
RECIPIENT_CLIENT_ID
-
Constructor Summary
Constructors Constructor Description EventVerifier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
verify(String eventPayload, String apiKey, Map<String,String> requestHeaders)
-
-
-
Field Detail
-
RECIPIENT_CLIENT_ID
public static final String RECIPIENT_CLIENT_ID
- See Also:
- Constant Field Values
-
ADOBE_IOEVENTS_SECURITY_DOMAIN
public static final String ADOBE_IOEVENTS_SECURITY_DOMAIN
- See Also:
- Constant Field Values
-
ADOBE_IOEVENTS_DIGI_SIGN_1
public static final String ADOBE_IOEVENTS_DIGI_SIGN_1
- See Also:
- Constant Field Values
-
ADOBE_IOEVENTS_DIGI_SIGN_2
public static final String ADOBE_IOEVENTS_DIGI_SIGN_2
- See Also:
- Constant Field Values
-
ADOBE_IOEVENTS_PUB_KEY_1_PATH
public static final String ADOBE_IOEVENTS_PUB_KEY_1_PATH
- See Also:
- Constant Field Values
-
ADOBE_IOEVENTS_PUB_KEY_2_PATH
public static final String ADOBE_IOEVENTS_PUB_KEY_2_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
verify
public boolean verify(String eventPayload, String apiKey, Map<String,String> requestHeaders)
- Parameters:
eventPayload
- the event payload to verifyapiKey
- the event payload `recipient_client_id` must be matching itrequestHeaders
- webhook request requestHeaders sent along the event payload: containing the path to the two public keys and the associated signatures of the eventPayload. Indeed, Adobe I/O Events sends two signatures, either of which is valid at any point of time (even when the signatures are rotated). So, the signed payload is considered valid if any one of the signatures is valid. Refer our public doc for more details - https://developer.adobe.com/events/docs/guides/#security-considerations- Returns:
- the security verification result
-
-