Interface OpenIDConnectNonceService

All Superinterfaces:
Service
All Known Implementing Classes:
NullOpenIDConnectNonceService

public interface OpenIDConnectNonceService extends Service
Manages nonce parameters for Slack OpenID Connect flow.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds a newly generated Nonce value to the server-side datastore.
    default void
    consume(Request request, Response response)
    Deletes the Nonce value from the server-side datastore and set a response header to delete the one in session.
    void
    Deletes a given Nonce value from the server-side datastore.
    default String
    Returns the Nonce parameter value from a given query string if it exists.
    Generates a new unique Nonce parameter value.
    boolean
    Verifies the Nonce value is available in the datastore and returns true if it's valid.
    default String
    issueNewNonce(Request request, Response response)
    Issues a new Nonce parameter and set it in both the browser session and the system's server-side datastore.
    default boolean
    isValid(Request request)
    Verifies the given Nonce parameter and returns true if it's valid.

    Methods inherited from interface com.slack.api.bolt.service.Service

    initializer
  • Method Details

    • extractNonceFromQueryString

      default String extractNonceFromQueryString(Request request)
      Returns the Nonce parameter value from a given query string if it exists.
    • issueNewNonce

      default String issueNewNonce(Request request, Response response) throws Exception
      Issues a new Nonce parameter and set it in both the browser session and the system's server-side datastore.
      Throws:
      Exception
    • generateNewNonceValue

      String generateNewNonceValue()
      Generates a new unique Nonce parameter value.
    • addNewNonceToDatastore

      void addNewNonceToDatastore(String nonce) throws Exception
      Adds a newly generated Nonce value to the server-side datastore.
      Throws:
      Exception
    • isValid

      default boolean isValid(Request request)
      Verifies the given Nonce parameter and returns true if it's valid. This method doesn't have any side effects, so that you can call this method multiple times.
    • isAvailableInDatabase

      boolean isAvailableInDatabase(String nonce)
      Verifies the Nonce value is available in the datastore and returns true if it's valid.
    • consume

      default void consume(Request request, Response response) throws Exception
      Deletes the Nonce value from the server-side datastore and set a response header to delete the one in session.
      Throws:
      Exception
    • deleteNonceFromDatastore

      void deleteNonceFromDatastore(String nonce) throws Exception
      Deletes a given Nonce value from the server-side datastore.
      Throws:
      Exception