Sha256: 22b4197ed27d5033edc8384dc9919596f1e5bf2d7f2b596dbcc678436ef9c459
Contents?: true
Size: 1.35 KB
Versions: 17
Compression:
Stored size: 1.35 KB
Contents
# typed: ignore # frozen_string_literal: true module Setsuzoku module Service module WebService module AuthStrategies # The API OAuth Authentication Interface definition. # Any Plugin that implements this must implement all methods required for OAuth. # # Defines all necessary methods for handling authentication for any authentication strategy. class BasicAuthStrategy < WebService::AuthStrategy extend T::Sig extend T::Helpers def self.required_instance_methods [] end def self.credential_class Setsuzoku::Service::WebService::Credentials::BasicAuthCredential end # OAuth API authentication headers. # # @return [Hash(String)] the formatted authorization headers for an OAuth request sig { override.returns(T::Hash[Symbol, T.untyped]) } def auth_headers { basic_auth: { username: self.credential.username, password: self.credential.password } } end # if the auth credientials are valid # # # sig { override.returns(T::Boolean) } def auth_credential_valid? true end end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems