Class: Sharepoint::Session

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

Defined Under Namespace

Classes: AuthenticationFailed, ConnexionToSharepointFailed, ConnexionToStsFailed, UnknownAuthenticationError

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#siteObject

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


50
51
52
# File 'lib/sharepoint-session.rb', line 50

def cookie
  "FedAuth=#{@fed_auth};rtFa=#{@rtFa}"
end