Class App

    • Constructor Detail

      • App

        public App()
    • Method Detail

      • get

        @NotNull
        public static App.AppGetRequest get()
        Creates a get request.
        Returns:
        the created request
      • getRateLimits

        @NotNull
        public static App.AppGetRateLimitsRequest getRateLimits()
        Creates a get rate limits request.
        Returns:
        the created request
      • revokeTokens

        @NotNull
        public static App.AppRevokeTokensRequest revokeTokens​(@Nullable
                                                              java.util.Date revokeTokensIssuedBefore)
        Creates a revoke tokens request
        Parameters:
        revokeTokensIssuedBefore - the limit date to revoke tokens
        Returns:
        the created request
      • verifyWebhook

        public boolean verifyWebhook​(@NotNull
                                     java.lang.String body,
                                     @NotNull
                                     java.lang.String signature)
        Validates if hmac signature is correct for message body.
        Parameters:
        body - raw body from http request converted to a string.
        signature - the signature provided in X-Signature header
        Returns:
        true if the signature is valid
      • verifyWebhookSignature

        public static boolean verifyWebhookSignature​(@NotNull
                                                     java.lang.String apiSecret,
                                                     @NotNull
                                                     java.lang.String body,
                                                     @NotNull
                                                     java.lang.String signature)
        Validates if hmac signature is correct for message body.
        Parameters:
        apiSecret - the secret key
        body - raw body from http request converted to a string.
        signature - the signature provided in X-Signature header
        Returns:
        true if the signature is valid
      • verifyWebhookSignature

        public static boolean verifyWebhookSignature​(@NotNull
                                                     java.lang.String body,
                                                     @NotNull
                                                     java.lang.String signature)
        Validates if hmac signature is correct for message body.
        Parameters:
        body - the message body
        signature - the signature provided in X-Signature header
        Returns:
        true if the signature is valid