Class: Sharepoint::HttpAuth::Session
- Inherits:
-
Object
- Object
- Sharepoint::HttpAuth::Session
- Defined in:
- lib/sharepoint-http-auth.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#site ⇒ Object
Returns the value of attribute site.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
- #authenticate(user, password) ⇒ Object
- #cookie ⇒ Object
- #curl(curb) ⇒ Object
-
#initialize(site) ⇒ Session
constructor
A new instance of Session.
Constructor Details
#initialize(site) ⇒ Session
Returns a new instance of Session.
10 11 12 |
# File 'lib/sharepoint-http-auth.rb', line 10 def initialize site @site = site end |
Instance Attribute Details
#password ⇒ Object (readonly)
Returns the value of attribute password.
8 9 10 |
# File 'lib/sharepoint-http-auth.rb', line 8 def password @password end |
#site ⇒ Object
Returns the value of attribute site.
7 8 9 |
# File 'lib/sharepoint-http-auth.rb', line 7 def site @site end |
#user ⇒ Object (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 |
#cookie ⇒ Object
19 20 21 |
# File 'lib/sharepoint-http-auth.rb', line 19 def 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 |