Interface ScramClientFunctionality

  • All Known Implementing Classes:
    ScramClientFunctionalityImpl

    public interface ScramClientFunctionality
    Provides building blocks for creating SCRAM authentication client
    • Method Detail

      • prepareFirstMessage

        java.lang.String prepareFirstMessage​(java.lang.String username)
                                      throws org.apache.activemq.artemis.spi.core.security.scram.ScramException
        Prepares the first client message
        Parameters:
        username - Username of the user
        Returns:
        First client message
        Throws:
        org.apache.activemq.artemis.spi.core.security.scram.ScramException - if username contains prohibited characters
      • prepareFinalMessage

        java.lang.String prepareFinalMessage​(java.lang.String password,
                                             java.lang.String serverFirstMessage)
                                      throws org.apache.activemq.artemis.spi.core.security.scram.ScramException
        Prepares client's final message
        Parameters:
        password - User password
        serverFirstMessage - Server's first message
        Returns:
        Client's final message
        Throws:
        org.apache.activemq.artemis.spi.core.security.scram.ScramException - if there is an error processing server's message, i.e. it violates the protocol
      • checkServerFinalMessage

        void checkServerFinalMessage​(java.lang.String serverFinalMessage)
                              throws org.apache.activemq.artemis.spi.core.security.scram.ScramException
        Checks if the server's final message is valid
        Parameters:
        serverFinalMessage - Server's final message
        Throws:
        org.apache.activemq.artemis.spi.core.security.scram.ScramException - if there is an error processing server's message, i.e. it violates the protocol
      • isSuccessful

        boolean isSuccessful()
        Checks if authentication is successful. You can call this method only if authentication is completed. Ensure that using isEnded()
        Returns:
        true if successful, false otherwise
      • isEnded

        boolean isEnded()
        Checks if authentication is completed, either successfully or not. Authentication is completed if getState() returns ENDED.
        Returns:
        true if authentication has ended