Module: Setsuzoku::Service::WebService::Credentials::CustomAuthCredential
- Extended by:
- T::Helpers, T::Sig
- Includes:
- Credential, UsesTokenCredential
- Defined in:
- lib/setsuzoku/service/web_service/credentials/custom_auth_credential.rb
Instance Attribute Summary
Attributes included from Credential
Class Method Summary collapse
-
.stub_credential ⇒ Struct
Stub a custom_auth_credential-like instance.
Instance Method Summary collapse
-
#auth_headers ⇒ Hash
The custom auth_headers this credential provides for custom_auth_strategy.
-
#uses_token? ⇒ Boolean
If the credential uses a token.
Methods included from UsesTokenCredential
#auth_base_url, #expires_on, #expires_on=, #refresh_token, #refresh_token=, #set_token!, #token, #token=
Methods included from Credential
#auth_actions, #settings, #settings=, #status, #status=
Class Method Details
.stub_credential ⇒ Struct
Stub a custom_auth_credential-like instance.
38 39 40 41 |
# File 'lib/setsuzoku/service/web_service/credentials/custom_auth_credential.rb', line 38 def self.stub_credential s = Struct.new(:auth_strategy, :status, :settings, :auth_headers, :uses_token?, :token, :refresh_token, :expires_on) s.new(nil, 'active', {}, { stubbed_auth_header: 'stubbed_auth_header' }, true, 'stubbed_token', 'stubbed_refresh_token', (Time.now + 30.days)) end |
Instance Method Details
#auth_headers ⇒ Hash
The custom auth_headers this credential provides for custom_auth_strategy.
29 |
# File 'lib/setsuzoku/service/web_service/credentials/custom_auth_credential.rb', line 29 def auth_headers; end |
#uses_token? ⇒ Boolean
If the credential uses a token.
22 |
# File 'lib/setsuzoku/service/web_service/credentials/custom_auth_credential.rb', line 22 def uses_token?; end |