Module: Dpop
- Defined in:
- lib/dpop.rb,
lib/dpop/railtie.rb,
lib/dpop/version.rb,
lib/dpop/encryptor.rb,
lib/dpop/controller.rb,
lib/dpop/cookie_jar.rb,
lib/dpop/configuration.rb,
lib/dpop/key_generator.rb,
lib/dpop/proof_generator.rb
Overview
DPoP top level methods
Defined Under Namespace
Modules: Controller, KeyGenerator Classes: Configuration, CookieJar, Encryptor, Error, ProofGenerator, Railtie
Constant Summary collapse
- VERSION =
"0.1.3"
Class Method Summary collapse
-
.configuration ⇒ Object
(also: config)
Returns the client’s Configuration object, or creates one if not yet created.
-
.configure {|configuration| ... } ⇒ Object
Configure Dpop application-wide settings.
- .generate_key_pair(alg = :rsa) ⇒ Object
- .get_proof_with_key(dpop_key, **args) ⇒ Object
- .load_integration ⇒ Object
Class Method Details
.configuration ⇒ Object Also known as: config
Returns the client’s Configuration object, or creates one if not yet created.
31 32 33 |
# File 'lib/dpop.rb', line 31 def configuration @configuration ||= Dpop::Configuration.new end |
.configure {|configuration| ... } ⇒ Object
Configure Dpop application-wide settings.
Yields a configuration object that can be used to override default settings.
26 27 28 |
# File 'lib/dpop.rb', line 26 def configure yield(configuration) if block_given? end |
.generate_key_pair(alg = :rsa) ⇒ Object
42 43 44 |
# File 'lib/dpop.rb', line 42 def generate_key_pair(alg = :rsa) Dpop::KeyGenerator.generate(alg) end |
.get_proof_with_key(dpop_key, **args) ⇒ Object
37 38 39 40 |
# File 'lib/dpop.rb', line 37 def get_proof_with_key(dpop_key, **args) generator = Dpop::ProofGenerator.new(dpop_key, "RS256") generator.create_dpop_proof(**args) end |
.load_integration ⇒ Object
46 47 48 |
# File 'lib/dpop.rb', line 46 def load_integration require "dpop/railtie" if defined?(Rails::Railtie) end |