Class: Cql::Auth::Authenticator

Inherits:
Object
  • Object
show all
Defined in:
lib/cql/auth.rb

Overview

Note:

Authenticators created by auth providers don't need to be subclasses of this class, but need to implement the same methods. This class exists only for documentation purposes.

An authenticator handles the authentication challenge/response cycles of a single connection. It can be stateful, but it must not for any reason block. If any of the method calls block, the whole connection process will be blocked.

Instance Method Summary collapse

Instance Method Details

#authentication_successful(token) ⇒ nil

Note:

This method must absolutely not block.

Called when the authentication is successful.

Parameters:

  • token (String)

    a token sent by the server

Returns:

  • (nil)

# File 'lib/cql/auth.rb', line 73

#challenge_response(token) ⇒ String

Note:

This method must absolutely not block.

If the authentication requires multiple challenge/response cycles this method will be called when a challenge is returned by the server. A response token must be created and will be sent back to the server.

Parameters:

  • token (String)

    a challenge token sent by the server

Returns:

  • (String)

    the authentication token to send back to the server


# File 'lib/cql/auth.rb', line 54

#initial_responseString

Note:

This method must absolutely not block.

This method must return the initial authentication token to be sent to the server.

Returns:

  • (String)

    the initial authentication token


# File 'lib/cql/auth.rb', line 45