Class: Sandal::Sig::None
- Inherits:
-
Object
- Object
- Sandal::Sig::None
- Includes:
- Singleton
- Defined in:
- lib/sandal/sig.rb
Overview
The “none” JWA signature method.
Constant Summary collapse
- NAME =
The JWA name of the algorithm.
"none"
Instance Method Summary collapse
-
#name ⇒ Object
The JWA name of the algorithm.
-
#sign(payload) ⇒ String
Returns an empty signature.
-
#valid?(signature, payload) ⇒ Boolean
Validates that a signature is nil or empty.
Instance Method Details
#name ⇒ Object
The JWA name of the algorithm.
15 16 17 |
# File 'lib/sandal/sig.rb', line 15 def name NAME end |
#sign(payload) ⇒ String
Returns an empty signature.
23 24 25 |
# File 'lib/sandal/sig.rb', line 23 def sign(payload) "" end |
#valid?(signature, payload) ⇒ Boolean
Validates that a signature is nil or empty.
32 33 34 |
# File 'lib/sandal/sig.rb', line 32 def valid?(signature, payload) signature.nil? || signature.empty? end |