Module: NTLM
- Defined in:
- lib/ntlm.rb,
lib/ntlm/util.rb,
lib/ntlm/message.rb
Defined Under Namespace
Modules: Util Classes: Message
Class Method Summary collapse
- .authenticate(challenge_message, user, domain, password, options = {}) ⇒ Object
- .negotiate(args = {}) ⇒ Object
Class Method Details
.authenticate(challenge_message, user, domain, password, options = {}) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/ntlm.rb', line 18 def self.authenticate(, user, domain, password, = {}) challenge = Message::Challenge.parse() opt = .merge({ :ntlm_v2_session => challenge.has_flag?(:NEGOTIATE_EXTENDED_SECURITY), }) nt_response, lm_response = Util.ntlm_v1_response(challenge.challenge, password, opt) Message::Authenticate.new( :user => user, :domain => domain, :lm_response => lm_response, :nt_response => nt_response ) end |