Interface EngineSaslDriver

  • All Known Implementing Classes:
    ProtonEngineNoOpSaslDriver

    public interface EngineSaslDriver
    Driver for the Engine that exposes SASL state and configuration.

    When configured for SASL authentication the SASL driver provides a view of the current state of the authentication and allows for configuration of the SASL layer prior to the start of the authentication process. Once authentication is complete the driver provides a means of determining the outcome of process.

    • Method Detail

      • client

        SaslClientContext client()
        Configure this EngineSaslDriver to operate in client mode and return the associated SaslClientContext instance that should be used to complete the SASL negotiation with the server end.
        Returns:
        the SASL client context.
        Throws:
        IllegalStateException - if the engine is already in server mode or the engine has not been configure with SASL support.
      • server

        SaslServerContext server()
        Configure this EngineSaslDriver to operate in server mode and return the associated SaslServerContext instance that should be used to complete the SASL negotiation with the client end.
        Returns:
        the SASL server context.
        Throws:
        IllegalStateException - if the engine is already in client mode or the engine has not been configure with SASL support.
      • getSaslState

        EngineSaslDriver.SaslState getSaslState()
        Returns a SaslState that indicates the current operating state of the SASL negotiation process or conversely if no SASL layer is configured this method should return the disabled state. This method must never return a null result.
        Returns:
        the current state of SASL Authentication.
      • getSaslOutcome

        SaslOutcome getSaslOutcome()
        Provides a low level outcome value for the SASL authentication process.

        If the SASL exchange is ongoing or the SASL layer was skipped because a particular engine configuration allows such behavior then this method should return null to indicate no SASL outcome is available.

        Returns:
        the SASL outcome code that results from authentication
      • getMaxFrameSize

        int getMaxFrameSize()
        Returns:
        the currently configured max frame size allowed for SASL frames.
      • setMaxFrameSize

        void setMaxFrameSize​(int maxFrameSize)
        Set the maximum frame size the remote can send before an error is indicated.
        Parameters:
        maxFrameSize - The maximum allowed frame size from the remote sender.