Class: RailsSso::TokenMock
- Inherits:
-
Object
- Object
- RailsSso::TokenMock
- Defined in:
- lib/rails_sso/token_mock.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
Instance Method Summary collapse
-
#initialize ⇒ TokenMock
constructor
A new instance of TokenMock.
- #refresh_token ⇒ Object
- #token ⇒ Object
Constructor Details
#initialize ⇒ TokenMock
Returns a new instance of TokenMock.
9 10 11 12 13 14 15 |
# File 'lib/rails_sso/token_mock.rb', line 9 def initialize(*) @connection = Faraday.new do |builder| builder.adapter :test do |stub| stub.delete(RailsSso.config.provider_sign_out_path) { |env| [200, {}, ''] } end end end |
Instance Attribute Details
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
5 6 7 |
# File 'lib/rails_sso/token_mock.rb', line 5 def connection @connection end |
Instance Method Details
#refresh_token ⇒ Object
21 22 23 |
# File 'lib/rails_sso/token_mock.rb', line 21 def refresh_token nil end |
#token ⇒ Object
17 18 19 |
# File 'lib/rails_sso/token_mock.rb', line 17 def token RailsSso.config.access_token_mock end |