java.lang.Object
org.freedesktop.dbus.connections.SASL

public class SASL extends Object
  • Field Details

  • Constructor Details

    • SASL

      @Deprecated(since="4.2.2 - 2023-02-03", forRemoval=true) public SASL()
      Deprecated, for removal: This API element is subject to removal in a future version.
      should not be used as SASL configuration is not provided
      Create a new SASL auth handler. Defaults to disable file descriptor passing.
    • SASL

      public SASL(SaslConfig _saslConfig)
      Create a new SASL auth handler.
      Parameters:
      _hasFileDescriptorSupport - true to support file descriptor passing (usually only works with UNIX_SOCKET).
      _saslConfig - SASL configuration
  • Method Details

    • receive

      public SASL.Command receive(SocketChannel _sock) throws IOException
      Throws:
      IOException
    • send

      public void send(SocketChannel _sock, SASL.SaslCommand _command, String... _data) throws IOException
      Throws:
      IOException
    • convertAuthTypes

      public String[] convertAuthTypes(int _types)
    • auth

      public boolean auth(SocketChannel _sock, AbstractTransport _transport) throws IOException
      Performs SASL auth on the given socketchannel. Mode selects whether to run as a SASL server or client. Types is a bitmask of the available auth types.
      Parameters:
      _config - sasl configuration parameters
      _sock - socket channel
      _transport - transport
      Returns:
      true if the auth was successful and false if it failed.
      Throws:
      IOException - on failure
    • isFileDescriptorSupported

      public boolean isFileDescriptorSupported()