Module: SecureJwt
- Extended by:
- Configs
- Defined in:
- lib/secure_jwt.rb,
lib/secure_jwt/version.rb
Defined Under Namespace
Modules: Configs
Classes: JwtTokenImpl
Constant Summary
collapse
- DEFAULT_ALGORITHMS =
{
jwt: "HS256",
data: "aes-256-gcm"
}
- VERSION =
"0.1.0.1"
Class Method Summary
collapse
Methods included from Configs
config
Class Method Details
.decrypt(jwt_token, signing_key = nil, options = {}, &data_key_decryptor) ⇒ Object
24
25
26
27
|
# File 'lib/secure_jwt.rb', line 24
def decrypt(jwt_token, signing_key = nil, options = {}, &data_key_decryptor)
secure_jwt = JwtTokenImpl.new signing_key, options
secure_jwt.decrypt jwt_token, options, &data_key_decryptor
end
|
.encrypt(payload, signing_key = nil, options = {}, &data_key_encryptor) ⇒ Object
19
20
21
22
|
# File 'lib/secure_jwt.rb', line 19
def encrypt(payload, signing_key = nil, options = {}, &data_key_encryptor)
secure_jwt = JwtTokenImpl.new signing_key, options
secure_jwt.encrypt payload, options, &data_key_encryptor
end
|