Class: Bookends::GlostickUserExtractor
- Inherits:
-
Object
- Object
- Bookends::GlostickUserExtractor
- Defined in:
- app/services/bookends/glostick_user_extractor.rb
Instance Attribute Summary collapse
-
#secret ⇒ Object
readonly
Returns the value of attribute secret.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(cookies, secret) ⇒ GlostickUserExtractor
constructor
A new instance of GlostickUserExtractor.
- #user ⇒ Object
Constructor Details
#initialize(cookies, secret) ⇒ GlostickUserExtractor
Returns a new instance of GlostickUserExtractor.
6 7 8 9 |
# File 'app/services/bookends/glostick_user_extractor.rb', line 6 def initialize(, secret) @secret = secret @token = CGI::unescape([:heroku_user_session]) if [:heroku_user_session] end |
Instance Attribute Details
#secret ⇒ Object (readonly)
Returns the value of attribute secret.
3 4 5 |
# File 'app/services/bookends/glostick_user_extractor.rb', line 3 def secret @secret end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
3 4 5 |
# File 'app/services/bookends/glostick_user_extractor.rb', line 3 def token @token end |
Instance Method Details
#user ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/services/bookends/glostick_user_extractor.rb', line 11 def user session_info = if session_info && session_info['user'] session_info['user'] else { 'email' => '', 'full_name' => '', 'id' => '' } end end |