Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Interceptor support for PUSH_REGISTER and PUSH_AUTHENTICATE Action types #218

Merged
merged 4 commits into from
Jun 29, 2023

Conversation

vahancouver
Copy link
Contributor

SDKS-2545

Add Interceptor support for PUSH_REGISTER and PUSH_AUTHENTICATE Action types

Add unit tests

class PushRequestInterceptor: RequestInterceptor {
func intercept(request: Request, action: Action) -> Request {
if action.type == "PUSH_REGISTER" {
RequestInterceptorTests.intercepted.append("PUSH_REGISTER")
Copy link
Contributor

@jeyanthanperiyasamy jeyanthanperiyasamy Jun 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as an extra step in the test, i think we can add some custom header in request and add those custom header part of AM_Push_Registration_Successful mocks to make sure the request has custom header .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the tests. added custom header to the request.

Copy link
Contributor

@jeyanthanperiyasamy jeyanthanperiyasamy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just make sure this changes will work all type of authentication like number challenge, biometric authentication, accept from the push notification with or without opening the app

@vahancouver
Copy link
Contributor Author

just make sure this changes will work all type of authentication like number challenge, biometric authentication, accept from the push notification with or without opening the app

Updated the test to use more generic handleNotification method that is called for accepting/denying all types of push notifications

Copy link
Contributor

@rodrigoareis rodrigoareis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes looks good to me

Copy link
Contributor

@spetrov spetrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍🏻

@spetrov spetrov merged commit c348807 into develop Jun 29, 2023
@spetrov spetrov deleted the SDKS-2545-authenticator-interceptor branch June 29, 2023 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants