Class: SparkApi::Authentication::SimpleProvider

Inherits:
BaseOAuth2Provider show all
Defined in:
lib/spark_api/authentication/oauth2_impl/simple_provider.rb

Instance Attribute Summary

Attributes inherited from BaseOAuth2Provider

#code, #grant_type

Instance Method Summary collapse

Methods inherited from BaseOAuth2Provider

#redirect, #session_timeout

Constructor Details

#initialize(credentials) ⇒ SimpleProvider

Returns a new instance of SimpleProvider.



4
5
6
7
# File 'lib/spark_api/authentication/oauth2_impl/simple_provider.rb', line 4

def initialize(credentials)
  super(credentials)
  @grant_type = :authorization_code
end

Instance Method Details

#destroy_sessionObject



17
18
19
# File 'lib/spark_api/authentication/oauth2_impl/simple_provider.rb', line 17

def destroy_session
  @session = nil 
end

#load_sessionObject



9
10
11
# File 'lib/spark_api/authentication/oauth2_impl/simple_provider.rb', line 9

def load_session
  @session
end

#save_session(session) ⇒ Object



13
14
15
# File 'lib/spark_api/authentication/oauth2_impl/simple_provider.rb', line 13

def save_session session
  @session = session
end