Class: BasicAndNego::Auth::GSS
- Inherits:
-
Object
- Object
- BasicAndNego::Auth::GSS
- Defined in:
- lib/basic_and_nego/auth/gss.rb
Instance Attribute Summary collapse
-
#gssapi ⇒ Object
readonly
Returns the value of attribute gssapi.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
-
#authenticate(token) ⇒ Object
Attempt to authenticate the furnished token against gssapi.
- #display_name ⇒ Object
-
#initialize(logger, service, realm, keytab) ⇒ GSS
constructor
Can raise GSSAPI::GssApiError.
Constructor Details
#initialize(logger, service, realm, keytab) ⇒ GSS
Can raise GSSAPI::GssApiError
11 12 13 14 15 16 17 18 19 |
# File 'lib/basic_and_nego/auth/gss.rb', line 11 def initialize(logger, service, realm, keytab) @logger = logger @service = service @realm = realm @keytab = keytab @gssapi = GSSAPI::Simple.new(@realm, @service, @keytab) gssapi.acquire_credentials end |
Instance Attribute Details
#gssapi ⇒ Object (readonly)
Returns the value of attribute gssapi.
6 7 8 |
# File 'lib/basic_and_nego/auth/gss.rb', line 6 def gssapi @gssapi end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
6 7 8 |
# File 'lib/basic_and_nego/auth/gss.rb', line 6 def logger @logger end |
Instance Method Details
#authenticate(token) ⇒ Object
Attempt to authenticate the furnished token against gssapi
It return nil (in case of error) or the token sent back by the gssapi if the authentication is successfull
27 28 29 |
# File 'lib/basic_and_nego/auth/gss.rb', line 27 def authenticate(token) return gssapi.accept_context(token) end |
#display_name ⇒ Object
31 32 33 |
# File 'lib/basic_and_nego/auth/gss.rb', line 31 def display_name return gssapi.display_name end |