Class: RubySMB::Gss::Provider::Base
- Inherits:
-
Object
- Object
- RubySMB::Gss::Provider::Base
- Defined in:
- lib/ruby_smb/gss/provider.rb
Overview
The base class for a GSS authentication provider. This class defines a common interface and is not usable as a provider on its own.
Instance Attribute Summary collapse
-
#allow_anonymous ⇒ Object
Whether or not anonymous authentication attempts should be permitted.
-
#allow_guests ⇒ Object
Whether or not unknown users should be allowed to authenticate as guests.
Instance Method Summary collapse
-
#mech_types ⇒ Array<OpenSSL::ASN1::ObjectId>
The GSS mechanisms this provider can handle, in preference order.
-
#new_authenticator(server_client) ⇒ Object
Create a new, client-specific authenticator instance.
-
#supports_mech_type?(mech_type) ⇒ Boolean
Whether this provider can handle a token for the specified mechanism.
Instance Attribute Details
#allow_anonymous ⇒ Object
Whether or not anonymous authentication attempts should be permitted.
52 53 54 |
# File 'lib/ruby_smb/gss/provider.rb', line 52 def allow_anonymous @allow_anonymous end |
#allow_guests ⇒ Object
Whether or not unknown users should be allowed to authenticate as guests.
57 58 59 |
# File 'lib/ruby_smb/gss/provider.rb', line 57 def allow_guests @allow_guests end |
Instance Method Details
#mech_types ⇒ Array<OpenSSL::ASN1::ObjectId>
The GSS mechanisms this provider can handle, in preference order. These are advertised to the client in the SPNEGO NegTokenInit, and are used to route an incoming token to the provider that understands it.
34 35 36 |
# File 'lib/ruby_smb/gss/provider.rb', line 34 def mech_types raise NotImplementedError end |
#new_authenticator(server_client) ⇒ Object
Create a new, client-specific authenticator instance. This new instance is then able to track the unique state of a particular client / connection.
25 26 27 |
# File 'lib/ruby_smb/gss/provider.rb', line 25 def new_authenticator(server_client) raise NotImplementedError end |
#supports_mech_type?(mech_type) ⇒ Boolean
Whether this provider can handle a token for the specified mechanism.
43 44 45 46 47 |
# File 'lib/ruby_smb/gss/provider.rb', line 43 def supports_mech_type?(mech_type) return false if mech_type.nil? mech_types.any? { |oid| oid.oid == mech_type.oid } end |