Class: SignIn::UserCreator

Inherits:
Object
  • Object
show all
Defined in:
app/services/sign_in/user_creator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user_attributes:, state_payload:, verified_icn:, request_ip:) ⇒ UserCreator

Returns a new instance of UserCreator.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'app/services/sign_in/user_creator.rb', line 20

def initialize(user_attributes:, state_payload:, verified_icn:, request_ip:)
  @state_payload = state_payload
  @idme_uuid = user_attributes[:idme_uuid]
  @logingov_uuid = user_attributes[:logingov_uuid]
  @authn_context = user_attributes[:authn_context]
  @current_ial = user_attributes[:current_ial]
  @max_ial = user_attributes[:max_ial]
  @credential_email = user_attributes[:csp_email]
  @multifactor = user_attributes[:multifactor]
  @edipi = user_attributes[:edipi]
  @mhv_correlation_id = user_attributes[:mhv_correlation_id]
  @verified_icn = verified_icn
  @request_ip = request_ip
  @first_name = user_attributes[:first_name]
  @last_name = user_attributes[:last_name]
end

Instance Attribute Details

#authn_contextObject (readonly)

Returns the value of attribute authn_context.



5
6
7
# File 'app/services/sign_in/user_creator.rb', line 5

def authn_context
  @authn_context
end

#credential_emailObject (readonly)

Returns the value of attribute credential_email.



5
6
7
# File 'app/services/sign_in/user_creator.rb', line 5

def credential_email
  @credential_email
end

#current_ialObject (readonly)

Returns the value of attribute current_ial.



5
6
7
# File 'app/services/sign_in/user_creator.rb', line 5

def current_ial
  @current_ial
end

#edipiObject (readonly)

Returns the value of attribute edipi.



5
6
7
# File 'app/services/sign_in/user_creator.rb', line 5

def edipi
  @edipi
end

#first_nameObject (readonly)

Returns the value of attribute first_name.



5
6
7
# File 'app/services/sign_in/user_creator.rb', line 5

def first_name
  @first_name
end

#idme_uuidObject (readonly)

Returns the value of attribute idme_uuid.



5
6
7
# File 'app/services/sign_in/user_creator.rb', line 5

def idme_uuid
  @idme_uuid
end

#last_nameObject (readonly)

Returns the value of attribute last_name.



5
6
7
# File 'app/services/sign_in/user_creator.rb', line 5

def last_name
  @last_name
end

#logingov_uuidObject (readonly)

Returns the value of attribute logingov_uuid.



5
6
7
# File 'app/services/sign_in/user_creator.rb', line 5

def logingov_uuid
  @logingov_uuid
end

#max_ialObject (readonly)

Returns the value of attribute max_ial.



5
6
7
# File 'app/services/sign_in/user_creator.rb', line 5

def max_ial
  @max_ial
end

#mhv_correlation_idObject (readonly)

Returns the value of attribute mhv_correlation_id.



5
6
7
# File 'app/services/sign_in/user_creator.rb', line 5

def mhv_correlation_id
  @mhv_correlation_id
end

#multifactorObject (readonly)

Returns the value of attribute multifactor.



5
6
7
# File 'app/services/sign_in/user_creator.rb', line 5

def multifactor
  @multifactor
end

#request_ipObject (readonly)

Returns the value of attribute request_ip.



5
6
7
# File 'app/services/sign_in/user_creator.rb', line 5

def request_ip
  @request_ip
end

#state_payloadObject (readonly)

Returns the value of attribute state_payload.



5
6
7
# File 'app/services/sign_in/user_creator.rb', line 5

def state_payload
  @state_payload
end

#verified_icnObject (readonly)

Returns the value of attribute verified_icn.



5
6
7
# File 'app/services/sign_in/user_creator.rb', line 5

def verified_icn
  @verified_icn
end

Instance Method Details

#performObject



37
38
39
40
41
42
43
44
# File 'app/services/sign_in/user_creator.rb', line 37

def perform
  create_authenticated_user
  create_credential_email
  create_user_acceptable_verified_credential
  create_terms_code_container if needs_accepted_terms_of_use?
  create_code_container
  user_code_map
end