Class: Sharepoint::Session
- Inherits:
-
Object
- Object
- Sharepoint::Session
- Defined in:
- lib/sharepoint-session.rb
Defined Under Namespace
Classes: AuthenticationFailed, ConnexionToSharepointFailed, ConnexionToStsFailed, UnknownAuthenticationError
Instance Attribute Summary collapse
-
#site ⇒ Object
Returns the value of attribute site.
Instance Method Summary collapse
- #authenticate(user, password, sts_url = nil) ⇒ Object
- #cookie ⇒ Object
-
#initialize(site) ⇒ Session
constructor
A new instance of Session.
Constructor Details
#initialize(site) ⇒ Session
Returns a new instance of Session.
40 41 42 |
# File 'lib/sharepoint-session.rb', line 40 def initialize site @site = site end |
Instance Attribute Details
#site ⇒ Object
Returns the value of attribute site.
38 39 40 |
# File 'lib/sharepoint-session.rb', line 38 def site @site end |
Instance Method Details
#authenticate(user, password, sts_url = nil) ⇒ Object
44 45 46 47 48 |
# File 'lib/sharepoint-session.rb', line 44 def authenticate user, password, sts_url = nil sts_url ||= MICROSOFT_STS_URL authenticate_to_sts user, password, sts_url get_access_token end |
#cookie ⇒ Object
50 51 52 |
# File 'lib/sharepoint-session.rb', line 50 def "FedAuth=#{@fed_auth};rtFa=#{@rtFa}" end |