module Toolhound::Authentication
Authentication
methods for {Toolhound::Client}
Public Instance Methods
authenticatable?()
click to toggle source
Indicates if the client was supplied Basic Auth username and password
@see @return [Boolean]
# File lib/toolhound-ruby/authentication.rb, line 11 def authenticatable? !!(@username && @password && @dataserver) end
reconnect()
click to toggle source
Closes the current active session by expiring the ticket.
# File lib/toolhound-ruby/authentication.rb, line 50 def reconnect sign_out sign_in end
sign_in()
click to toggle source
# File lib/toolhound-ruby/authentication.rb, line 16 def sign_in @connection ||= begin TinyTds::Client.new( dataserver: @dataserver, port: @port, username: @username, password: @password, timeout: @timeout ) end end
sign_out()
click to toggle source
# File lib/toolhound-ruby/authentication.rb, line 54 def sign_out @connection.close if @connection @connection = nil # post "api/logout" # @me = nil end
Also aliased as: logout