Class: SparkApi::Authentication::SingleSessionProvider
Instance Attribute Summary
#code, #grant_type
Instance Method Summary
collapse
#redirect, #session_timeout
Constructor Details
Returns a new instance of SingleSessionProvider.
6
7
8
9
|
# File 'lib/spark_api/authentication/oauth2_impl/single_session_provider.rb', line 6
def initialize(credentials)
@access_token = credentials.delete(:access_token)
super(credentials)
end
|
Instance Method Details
#destroy_session ⇒ Object
21
22
23
|
# File 'lib/spark_api/authentication/oauth2_impl/single_session_provider.rb', line 21
def destroy_session
@session = nil
end
|
#load_session ⇒ Object
11
12
13
14
15
|
# File 'lib/spark_api/authentication/oauth2_impl/single_session_provider.rb', line 11
def load_session
@session ||= SparkApi::Authentication::OAuthSession.new({
:access_token => @access_token
})
end
|
#save_session(session) ⇒ Object
17
18
19
|
# File 'lib/spark_api/authentication/oauth2_impl/single_session_provider.rb', line 17
def save_session session
@session = session
end
|