Class: InheritedProofing::UserAttributesEncryptor

Inherits:
Object
  • Object
show all
Defined in:
lib/inherited_proofing/user_attributes_encryptor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user_attributes:) ⇒ UserAttributesEncryptor

Returns a new instance of UserAttributesEncryptor.



9
10
11
# File 'lib/inherited_proofing/user_attributes_encryptor.rb', line 9

def initialize(user_attributes:)
  @user_attributes = user_attributes
end

Instance Attribute Details

#user_attributesObject (readonly)

Returns the value of attribute user_attributes.



7
8
9
# File 'lib/inherited_proofing/user_attributes_encryptor.rb', line 7

def user_attributes
  @user_attributes
end

Instance Method Details

#performObject



13
14
15
# File 'lib/inherited_proofing/user_attributes_encryptor.rb', line 13

def perform
  JWE.encrypt(user_attributes.to_json, public_key)
end