Class: Decidim::TrustedIds::Verifications::TrustedIdsHandler

Inherits:
AuthorizationHandler
  • Object
show all
Defined in:
app/forms/decidim/trusted_ids/verifications/trusted_ids_handler.rb

Instance Method Summary collapse

Instance Method Details

#form_attributesObject

no public attributes



30
31
32
# File 'app/forms/decidim/trusted_ids/verifications/trusted_ids_handler.rb', line 30

def form_attributes
  attributes.except(:id, :user, :provider, :uid, :extra).keys
end

#metadataObject



15
16
17
18
19
20
21
# File 'app/forms/decidim/trusted_ids/verifications/trusted_ids_handler.rb', line 15

def 
  super.merge(
    uid: uid,
    provider: provider,
    extra: extra_attributes
  )
end

#to_partial_pathObject



34
35
36
# File 'app/forms/decidim/trusted_ids/verifications/trusted_ids_handler.rb', line 34

def to_partial_path
  "decidim/trusted_ids/verifications/form"
end

#unique_idObject



23
24
25
26
27
# File 'app/forms/decidim/trusted_ids/verifications/trusted_ids_handler.rb', line 23

def unique_id
  Digest::SHA512.hexdigest(
    "#{uid}-#{user&.decidim_organization_id}-#{Rails.application.secret_key_base}"
  )
end