Module: Linzer::Signature::Profile
- Defined in:
- lib/linzer/signature/profile.rb,
lib/linzer/signature/profile/base.rb,
lib/linzer/signature/profile/example.rb,
lib/linzer/signature/profile/web_bot_auth.rb
Overview
A signing profile defines optional behavior that can modify a signing context prior to HTTP Message Signature generation.
Profiles are used to encapsulate domain-specific signing rules such as:
-
default covered components
-
parameter enrichment
-
contextual header injection
-
policy-based adjustments to signing behavior
Profiles are applied *before signature computation* and may mutate Context.
Defined Under Namespace
Classes: Base, Example, WebBotAuth
Class Method Summary collapse
-
.resolve(profile) ⇒ Profile::Base?
Resolves a signing profile from a symbolic or object-based reference.
-
.web_bot_auth(**options) ⇒ Profile::WebBotAuth
Convenience constructor for a Web Bot Auth signing profile.
Class Method Details
.resolve(profile) ⇒ Profile::Base?
Resolves a signing profile from a symbolic or object-based reference.
This allows callers to pass either:
-
nil(no profile) -
an already constructed profile instance
-
a symbolic identifier for a registered profile
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/linzer/signature/profile.rb', line 37 def self.resolve(profile) unsupported = "Unknown/unsupported signing profile!" case profile when NilClass, Profile::Base profile when Symbol case profile when :web_bot_auth WebBotAuth.default else raise Error, unsupported end else raise Error, unsupported end end |
.web_bot_auth(**options) ⇒ Profile::WebBotAuth
Convenience constructor for a Web Bot Auth signing profile.
This is a helper for constructing a profile instance directly without using resolve.
65 66 67 |
# File 'lib/linzer/signature/profile.rb', line 65 def self.web_bot_auth(**) WebBotAuth.new(**) end |