Class: Sharepoint::HttpAuth::Session

Inherits:
Object
  • Object
show all
Defined in:
lib/sharepoint-http-auth.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(site) ⇒ Session



10
11
12
# File 'lib/sharepoint-http-auth.rb', line 10

def initialize site
  @site     = site
end

Instance Attribute Details

#passwordObject (readonly)

Returns the value of attribute password



8
9
10
# File 'lib/sharepoint-http-auth.rb', line 8

def password
  @password
end

#siteObject

Returns the value of attribute site



7
8
9
# File 'lib/sharepoint-http-auth.rb', line 7

def site
  @site
end

#userObject (readonly)

Returns the value of attribute user



8
9
10
# File 'lib/sharepoint-http-auth.rb', line 8

def user
  @user
end

Instance Method Details

#authenticate(user, password) ⇒ Object



14
15
16
17
# File 'lib/sharepoint-http-auth.rb', line 14

def authenticate user, password
  @user     = user
  @password = password
end


19
20
21
# File 'lib/sharepoint-http-auth.rb', line 19

def cookie
  String.new
end

#curl(curb) ⇒ Object



23
24
25
26
27
# File 'lib/sharepoint-http-auth.rb', line 23

def curl curb
  curb.http_auth_types = :ntlm
  curb.username        = @user
  curb.password        = @password
end