Interface OpenIDConnectNonceService

    • Method Detail

      • 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