Skip to content

Commit

Permalink
removes MHV, DSLogon, and IAL/LOA1 references from rep user loader
Browse files Browse the repository at this point in the history
  • Loading branch information
bramleyjl committed Apr 17, 2024
1 parent 88ec761 commit 98c4a34
Showing 1 changed file with 4 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ def validate_account_and_session
end

def loa
current_loa = user_is_verified? ? SignIn::Constants::Auth::LOA_THREE : SignIn::Constants::Auth::LOA_ONE
{ current: current_loa, highest: SignIn::Constants::Auth::LOA_THREE }
{ current: SignIn::Constants::Auth::LOA_THREE, highest: SignIn::Constants::Auth::LOA_THREE }
end

def sign_in
Expand All @@ -42,20 +41,8 @@ def sign_in
end

def authn_context
case user_verification.credential_type
when SignIn::Constants::Auth::IDME
user_is_verified? ? SignIn::Constants::Auth::IDME_LOA3 : SignIn::Constants::Auth::IDME_LOA1
when SignIn::Constants::Auth::DSLOGON
user_is_verified? ? SignIn::Constants::Auth::IDME_DSLOGON_LOA3 : SignIn::Constants::Auth::IDME_DSLOGON_LOA1
when SignIn::Constants::Auth::MHV
user_is_verified? ? SignIn::Constants::Auth::IDME_MHV_LOA3 : SignIn::Constants::Auth::IDME_MHV_LOA1
when SignIn::Constants::Auth::LOGINGOV
user_is_verified? ? SignIn::Constants::Auth::LOGIN_GOV_IAL2 : SignIn::Constants::Auth::LOGIN_GOV_IAL1
end
end

def user_is_verified?
session.user_account.verified?
user_verification.credential_type == SignIn::Constants::Auth::IDME ? SignIn::Constants::Auth::IDME_LOA3 :
SignIn::Constants::Auth::LOGIN_GOV_IAL2
end

def session
Expand Down Expand Up @@ -93,7 +80,7 @@ def current_user
user.logingov_uuid = user_verification.logingov_uuid
user.ogc_number = ogc_number # TODO-ARF 80297: Determine how to get ogc_number into RepresentativeUserLoader
user.poa_codes = get_poa_codes
user.idme_uuid = user_verification.idme_uuid || user_verification.backing_idme_uuid
user.idme_uuid = user_verification.idme_uuid
user.last_signed_in = session.created_at
user.sign_in = sign_in
user.save
Expand Down

0 comments on commit 98c4a34

Please sign in to comment.