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 DFP endpoints #68

Merged
merged 4 commits into from
Jan 6, 2025
Merged

Add DFP endpoints #68

merged 4 commits into from
Jan 6, 2025

Conversation

jennifer-stytch
Copy link
Contributor

@jennifer-stytch jennifer-stytch commented Jan 3, 2025

This PR adds the two backend DFP endpoints: /v1/fingerprint/lookup and /v1/rules/set.

Base URLs for both the API and DFP endpoints are now configurable via the OptionalClientConfig parameter on the StytchClient and StytchB2BClient.

Marking as MAJOR because of the metric_type fix from optional to required.

@@ -42,7 +44,7 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.SupervisorJob
import org.jose4j.jwk.HttpsJwks

public class StytchB2BClient(projectId: String, secret: String) {
public class StytchB2BClient(projectId: String, secret: String, fraudBaseUrl: String = "https://telemetry.stytch.com") {
Copy link
Contributor

Choose a reason for hiding this comment

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

In order to allow default parameters in Java (ie: not have to specify the URL), you need to annotate the constructor with @JvmOverloads. This tells the compiler to create every possible permutation with and without default parameters.

So this should be:

public class StytchClient @JvmOverloads constructor (projectId: String, secret: String, fraudBaseUrl: String = "https://telemetry.stytch.com") {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jennifer-stytch jennifer-stytch merged commit 9c98ad7 into main Jan 6, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants