Module: TrueLayerSigning

Extended by:
Forwardable
Defined in:
lib/truelayer-signing.rb,
lib/truelayer-signing/utils.rb,
lib/truelayer-signing/config.rb,
lib/truelayer-signing/errors.rb,
lib/truelayer-signing/signer.rb,
lib/truelayer-signing/verifier.rb

Defined Under Namespace

Classes: Config, Error, JwsBase, JwsHeader, Signer, Utils, Verifier

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject (readonly)

Returns the value of attribute config.



22
23
24
# File 'lib/truelayer-signing.rb', line 22

def config
  @config
end

Class Method Details

.extract_jws_header(signature) ⇒ Object



33
34
35
# File 'lib/truelayer-signing.rb', line 33

def extract_jws_header(signature)
  Verifier.parse_tl_signature(signature).first
end

.sign_with_pemObject



29
30
31
# File 'lib/truelayer-signing.rb', line 29

def sign_with_pem
  Signer.new
end

.verify_with_jwks(jwks) ⇒ Object



37
38
39
# File 'lib/truelayer-signing.rb', line 37

def verify_with_jwks(jwks)
  Verifier.new(key_type: :jwks, key_value: jwks)
end

.verify_with_pem(pem) ⇒ Object



41
42
43
# File 'lib/truelayer-signing.rb', line 41

def verify_with_pem(pem)
  Verifier.new(key_type: :pem, key_value: pem)
end