module Setsuzoku::Service::WebService::Credentials::CustomAuthCredential
Public Class Methods
stub_credential()
click to toggle source
Stub a custom_auth_credential-like instance.
@return [Struct] a stubbed custom_auth_credential-like struct.
# 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
Public Instance Methods
auth_headers()
click to toggle source
The custom auth_headers
this credential provides for custom_auth_strategy.
@return [Hash] the auth headers.
# File lib/setsuzoku/service/web_service/credentials/custom_auth_credential.rb, line 29 def auth_headers; end
uses_token?()
click to toggle source
If the credential uses a token.
@return [Boolean] if the credential should request and store tokens.
# File lib/setsuzoku/service/web_service/credentials/custom_auth_credential.rb, line 22 def uses_token?; end