Class: Sorcery::Providers::Base
- Inherits:
-
Object
- Object
- Sorcery::Providers::Base
- Defined in:
- lib/sorcery/providers/base.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
readonly
Returns the value of attribute access_token.
-
#callback_url ⇒ Object
Returns the value of attribute callback_url.
-
#key ⇒ Object
Returns the value of attribute key.
-
#original_callback_url ⇒ Object
Returns the value of attribute original_callback_url.
-
#secret ⇒ Object
Returns the value of attribute secret.
-
#site ⇒ Object
Returns the value of attribute site.
-
#state ⇒ Object
Returns the value of attribute state.
-
#user_info_mapping ⇒ Object
Returns the value of attribute user_info_mapping.
Class Method Summary collapse
-
.descendants ⇒ Object
Ensure that all descendant classes are loaded before run this.
- .name ⇒ Object
Instance Method Summary collapse
- #has_callback? ⇒ Boolean
-
#initialize ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
12 13 14 |
# File 'lib/sorcery/providers/base.rb', line 12 def initialize @user_info_mapping = {} end |
Instance Attribute Details
#access_token ⇒ Object (readonly)
Returns the value of attribute access_token.
5 6 7 |
# File 'lib/sorcery/providers/base.rb', line 5 def access_token @access_token end |
#callback_url ⇒ Object
Returns the value of attribute callback_url.
7 8 9 |
# File 'lib/sorcery/providers/base.rb', line 7 def callback_url @callback_url end |
#key ⇒ Object
Returns the value of attribute key.
7 8 9 |
# File 'lib/sorcery/providers/base.rb', line 7 def key @key end |
#original_callback_url ⇒ Object
Returns the value of attribute original_callback_url.
7 8 9 |
# File 'lib/sorcery/providers/base.rb', line 7 def original_callback_url @original_callback_url end |
#secret ⇒ Object
Returns the value of attribute secret.
7 8 9 |
# File 'lib/sorcery/providers/base.rb', line 7 def secret @secret end |
#site ⇒ Object
Returns the value of attribute site.
7 8 9 |
# File 'lib/sorcery/providers/base.rb', line 7 def site @site end |
#state ⇒ Object
Returns the value of attribute state.
7 8 9 |
# File 'lib/sorcery/providers/base.rb', line 7 def state @state end |
#user_info_mapping ⇒ Object
Returns the value of attribute user_info_mapping.
7 8 9 |
# File 'lib/sorcery/providers/base.rb', line 7 def user_info_mapping @user_info_mapping end |
Class Method Details
.descendants ⇒ Object
Ensure that all descendant classes are loaded before run this
21 22 23 |
# File 'lib/sorcery/providers/base.rb', line 21 def self.descendants ObjectSpace.each_object(Class).select { |klass| klass < self } end |
.name ⇒ Object
16 17 18 |
# File 'lib/sorcery/providers/base.rb', line 16 def self.name super.gsub(/Sorcery::Providers::/, '').downcase end |
Instance Method Details
#has_callback? ⇒ Boolean
10 |
# File 'lib/sorcery/providers/base.rb', line 10 def has_callback?; true; end |