Class: JWT::JWA::None

Inherits:
Object
  • Object
show all
Includes:
SigningAlgorithm
Defined in:
lib/jwt/jwa/none.rb

Overview

Implementation of the none algorithm

Instance Attribute Summary

Attributes included from SigningAlgorithm

#alg

Instance Method Summary collapse

Methods included from SigningAlgorithm

#header, #raise_sign_error!, #raise_verify_error!, #valid_alg?

Constructor Details

#initializeNone

Returns a new instance of None.



9
10
11
# File 'lib/jwt/jwa/none.rb', line 9

def initialize
  @alg = 'none'
end

Instance Method Details

#signObject



13
14
15
# File 'lib/jwt/jwa/none.rb', line 13

def sign(*)
  ''
end

#verifyObject



17
18
19
# File 'lib/jwt/jwa/none.rb', line 17

def verify(*)
  true
end