Class: SingleTokenCookieSetter

Inherits:
Object
  • Object
show all
Defined in:
app/services/stormpath/rails/token_cookie_setter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cookie_jar, token, token_config) ⇒ SingleTokenCookieSetter

Returns a new instance of SingleTokenCookieSetter.



37
38
39
40
41
# File 'app/services/stormpath/rails/token_cookie_setter.rb', line 37

def initialize(cookie_jar, token, token_config)
  @cookie_jar = cookie_jar
  @token = token
  @token_config = token_config
end

Instance Attribute Details

Returns the value of attribute cookie_jar.



35
36
37
# File 'app/services/stormpath/rails/token_cookie_setter.rb', line 35

def cookie_jar
  @cookie_jar
end

#tokenObject (readonly)

Returns the value of attribute token.



35
36
37
# File 'app/services/stormpath/rails/token_cookie_setter.rb', line 35

def token
  @token
end

#token_configObject (readonly)

Returns the value of attribute token_config.



35
36
37
# File 'app/services/stormpath/rails/token_cookie_setter.rb', line 35

def token_config
  @token_config
end

Instance Method Details

#callObject



43
44
45
# File 'app/services/stormpath/rails/token_cookie_setter.rb', line 43

def call
  cookie_jar[token_config.name] = cookie_data
end