infra/userportal/states/auth.py [55:77]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    compare.next(user_exists)

    '''
    If not in Dynamo, Search collection to authenticate the users
    '''
    search = sft.LambdaInvoke(self,'Search-ExistingFaces',
      input_path='$.inputRequest',   
      result_path='$.search',
      output_path='$',
      lambda_function=functions.search_faces_by_image.function,
      invocation_type= sft.LambdaInvocationType.REQUEST_RESPONSE)

    user_exists.otherwise(search)

    '''
    Confirm the caller's has the correct picture
    '''
    is_calleruser = sf.Choice(self,'Check-SearchResults')
    is_calleruser.when(
      condition= sf.Condition.boolean_equals('$.compare.Payload.TopMatch.IsCallerUser',False),
      next= sf.Fail(self,'InvalidCredentials',
        error='UserAccessDenied',
        cause='The wrong person is in the photo.'))
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



infra/userportal/states/update.py [55:77]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    compare.next(user_exists)

    '''
    If not in Dynamo, Search collection to authenticate the users
    '''
    search = sft.LambdaInvoke(self,'Search-ExistingFaces',
      input_path='$.inputRequest',   
      result_path='$.search',
      output_path='$',
      lambda_function=functions.search_faces_by_image.function,
      invocation_type= sft.LambdaInvocationType.REQUEST_RESPONSE)

    user_exists.otherwise(search)

    '''
    Confirm the caller's has the correct picture
    '''
    is_calleruser = sf.Choice(self,'Check-SearchResults')
    is_calleruser.when(
      condition= sf.Condition.boolean_equals('$.compare.Payload.TopMatch.IsCallerUser',False),
      next= sf.Fail(self,'InvalidCredentials',
        error='UserAccessDenied',
        cause='The wrong person is in the photo.'))
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



