Class App

    • Constructor Detail

      • App

        public App()
    • Method Detail

      • get

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

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

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

        @NotNull
        public static @NotNull App.ListPushProvidersRequest listPushProviders()
        Creates a list push providers request
        Returns:
        the created request
      • deletePushProvider

        @NotNull
        public static @NotNull App.DeletePushProviderRequest deletePushProvider​(@NotNull
                                                                                @NotNull java.lang.String providerType,
                                                                                @NotNull
                                                                                @NotNull java.lang.String name)
        Creates a delete push provider request
        Parameters:
        providerType - push provider type
        name - push provider name
        Returns:
        the created request
      • verifyWebhook

        public boolean verifyWebhook​(@NotNull
                                     @NotNull java.lang.String body,
                                     @NotNull
                                     @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
                                                     @NotNull java.lang.String apiSecret,
                                                     @NotNull
                                                     @NotNull java.lang.String body,
                                                     @NotNull
                                                     @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
                                                     @NotNull java.lang.String body,
                                                     @NotNull
                                                     @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