Sha256: 7cb44952d41ce59c064e6bfb917a1f3a7714d4f57f9ed60110fa89af533b00ee
Contents?: true
Size: 1.36 KB
Versions: 22
Compression:
Stored size: 1.36 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 the basic auth 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 { authorization: { 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
22 entries across 22 versions & 1 rubygems