Skip to content

UserLoginController

reference
1 min readUpdated

Kind: Controller

Source: Pams/API/Pams.API/Controllers/Security/UserLoginController.cs (line 15)

Part of: Pams

Where it refuses work

  • UserLoginController stops the work with an early return when !ModelState.IsValid, in 2 places.
  • UserLoginController stops the work with an early return when !string.IsNullOrEmpty(tokenData.Message), in 2 places.
  • UserLoginController stops the work with an early return when user == null || !user.HasObject, in 2 places.
  • UserLoginController stops the work with an early return when user == null || !user.IsValid.
  • UserLoginController stops the work with an early return when !isDomainValid.
  • UserLoginController stops the work with an early return when result is string.

When something fails

  • UserLoginController handles failure in 5 places: it turns it into a return value in 4, and discards it silently in 1. A failure discarded silently leaves no trace for whoever debugs this later.

Relationships

  • MODULE_DECLARES → EnhancedLogin
  • MODULE_DECLARES → Verify2FA
  • MODULE_DECLARES → Resend2FACode
  • MODULE_DECLARES → GetUserSessions
  • MODULE_DECLARES → EndSession
  • MODULE_DECLARES → EndAllOtherSessions
  • MODULE_DECLARES → RefreshToken
  • MODULE_DECLARES → SaveUserLogout
  • MODULE_DECLARES → SendResetPasswordMail
  • MODULE_DECLARES → UpdateUserPassword
  • IMPORTS → EnhancedLoginViewModel
  • IMPORTS → Enhanced2FAVerificationViewModel
  • IMPORTS → ResendCodeViewModel
  • IMPORTS → DeviceInfoViewModel
  • IMPORTS → DeliveryMethod
  • IMPORTS → Login
  • IMPORTS → PersonUser
  • IMPORTS → DeviceAuthenticationResult
  • IMPORTS → LoginContextInfo
  • IMPORTS → LoginFlowResult
  • IMPORTS → SessionCreationResult
  • IMPORTS → Update
  • IMPORTS → Update
  • IMPORTS → LocationInfoViewModel
  • IMPORTS → TwoFactorCompletionContext
  • IMPORTS → TokenRefreshRequest
  • IMPORTS → LookUpCommonBindingModel
  • IMPORTS → Person
  • IMPORTS → ApplicationUserManager

Used by

3 references from 3 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

calls by (3)

  • PersonServiceFrontend/src/app/services/person/person.service.ts:1
  • EnahnceLoginResponseFrontend/src/app/services/security/auth.service.ts:1
  • checkExistingAuthOutlook_plugin/src/taskpane/taskpane.ts:273

Was this page helpful?

Download as PDF