Sha256: 1498dfc7640d0df63bfef0716a8a5fc95fe6460d9fadbeb85bff0faf1b5f09ee
Contents?: true
Size: 1.43 KB
Versions: 26
Compression:
Stored size: 1.43 KB
Contents
# typed: strict # frozen_string_literal: true module Setsuzoku module Service module WebService module Credentials module CustomAuthCredential extend T::Sig extend T::Helpers include Setsuzoku::Credential include UsesTokenCredential abstract! # # uses_token? sig{ abstract.returns(T::Boolean) } # # If the credential uses a token. # # @return [Boolean] if the credential should request and store tokens. def uses_token?; end # # auth_headers sig{ abstract.returns(T::Hash[Symbol, T.untyped]) } # The custom auth_headers this credential provides for custom_auth_strategy. # # @return [Hash] the auth headers. def auth_headers; end # # self.stub_credential sig { returns(Struct) } # # Stub a custom_auth_credential-like instance. # # @return [Struct] a stubbed custom_auth_credential-like struct. 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 end end end end end
Version data entries
26 entries across 26 versions & 1 rubygems