Class: JWT::JWA::Wrapper
Instance Method Summary
collapse
included, #raise_sign_error!, #raise_verify_error!
Constructor Details
#initialize(algorithm) ⇒ Wrapper
Returns a new instance of Wrapper.
8
9
10
|
# File 'lib/jwt/jwa/wrapper.rb', line 8
def initialize(algorithm)
@algorithm = algorithm
end
|
Instance Method Details
#alg ⇒ Object
12
13
14
15
16
|
# File 'lib/jwt/jwa/wrapper.rb', line 12
def alg
return @algorithm.alg if @algorithm.respond_to?(:alg)
super
end
|
24
25
26
27
28
|
# File 'lib/jwt/jwa/wrapper.rb', line 24
def (*args, **kwargs)
return @algorithm.(*args, **kwargs) if @algorithm.respond_to?(:header)
super
end
|
#sign(*args, **kwargs) ⇒ Object
30
31
32
33
34
|
# File 'lib/jwt/jwa/wrapper.rb', line 30
def sign(*args, **kwargs)
return @algorithm.sign(*args, **kwargs) if @algorithm.respond_to?(:sign)
super
end
|
#valid_alg?(alg_to_check) ⇒ Boolean
18
19
20
21
22
|
# File 'lib/jwt/jwa/wrapper.rb', line 18
def valid_alg?(alg_to_check)
return @algorithm.valid_alg?(alg_to_check) if @algorithm.respond_to?(:valid_alg?)
super
end
|
#verify(*args, **kwargs) ⇒ Object
36
37
38
39
40
|
# File 'lib/jwt/jwa/wrapper.rb', line 36
def verify(*args, **kwargs)
return @algorithm.verify(*args, **kwargs) if @algorithm.respond_to?(:verify)
super
end
|