Class: RubySMB::Gss::Provider::Authenticator::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_smb/gss/provider/authenticator.rb

Overview

The base class for a GSS provider's unique authenticator. This provides a common interface and is not usable on it's own. The provider-specific authentication logic is defined within this authenticator class which actually runs the authentication routine.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(provider, server_client) ⇒ Base

Returns a new instance of Base.

Parameters:

  • provider (Provider::Base)

    the GSS provider that this instance is an authenticator for

  • server_client

    the client instance that this will be an authenticator for



13
14
15
16
17
18
# File 'lib/ruby_smb/gss/provider/authenticator.rb', line 13

def initialize(provider, server_client)
  @provider = provider
  @server_client = server_client
  @session_key = nil
  reset!
end

Instance Attribute Details

#session_keyObject

Returns the value of attribute session_key.



41
42
43
# File 'lib/ruby_smb/gss/provider/authenticator.rb', line 41

def session_key
  @session_key
end

Instance Method Details

#loggerObject



20
21
22
# File 'lib/ruby_smb/gss/provider/authenticator.rb', line 20

def logger
  @server_client.logger
end

#process(request_buffer = nil) ⇒ Gss::Provider::Result

Process a GSS authentication buffer. If no buffer is specified, the request is assumed to be the first in the negotiation sequence.

Parameters:

  • buffer (String, nil)

    the request GSS request buffer that should be processed

Returns:

Raises:

  • (NotImplementedError)


30
31
32
# File 'lib/ruby_smb/gss/provider/authenticator.rb', line 30

def process(request_buffer=nil)
  raise NotImplementedError
end

#reset!Object

Reset the authenticator's state, wiping anything related to a partial or complete authentication process.



37
38
39
# File 'lib/ruby_smb/gss/provider/authenticator.rb', line 37

def reset!
  @session_key = nil
end