Module: ApiRspecta::ApiRequestsHelpers::RequestHelpers
- Defined in:
- lib/api_rspecta.rb
Instance Method Summary collapse
- #auth_header(options) ⇒ Object
- #default_options ⇒ Object
- #guest_options ⇒ Object
- #token_auth_header ⇒ Object
Instance Method Details
#auth_header(options) ⇒ Object
94 95 96 |
# File 'lib/api_rspecta.rb', line 94 def auth_header [:auth_header] || {} end |
#default_options ⇒ Object
98 99 100 |
# File 'lib/api_rspecta.rb', line 98 def { auth_header: token_auth_header } end |
#guest_options ⇒ Object
102 103 104 |
# File 'lib/api_rspecta.rb', line 102 def {} end |
#token_auth_header ⇒ Object
89 90 91 92 |
# File 'lib/api_rspecta.rb', line 89 def token_auth_header #{ 'HTTP_AUTHORIZATION' => ActionController::HttpAuthentication::Token.encode_credentials(ENV['auth_token']) } {} end |