Sha256: f22ae5f00e0da47eb4620ca913d3db34bd325fa24a8fb3f0a683bc319a66e144
Contents?: true
Size: 1.44 KB
Versions: 17
Compression:
Stored size: 1.44 KB
Contents
# typed: strict # frozen_string_literal: true module Setsuzoku module Service # The Token-based API Authentication Interface definition. # Any Plugin that implements this must implement all methods defined here. # # Defines all necessary methods for handling authentication for any token-based authentication. module WebService class AuthStrategy include Setsuzoku::AuthStrategy extend T::Sig extend T::Helpers abstract! # The authorization headers that need to be defined for this authentication strategy. # # @return [Hash(String)] the authorization key/values needed for authentication. sig { abstract.returns(T::Hash[Symbol, T.untyped]) } def auth_headers;end # These are interface methods that a plugin that implements this strategy must implement. module InterfaceMethods extend T::Sig extend T::Helpers abstract! # All auth actions that are implemented. # # @return [Hash] all auth endpoint definitions for the API. sig { abstract.returns(T::Hash[T.untyped, T.untyped]) } def auth_actions; end # The base auth url for the plugin. # # @return [String] the auth url. sig { overridable.returns(String) } def auth_base_url self.plugin.api_base_url end end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems