Class SignInPolicies

java.lang.Object
com.iizix.server.user.mfa.SignInPolicies

public final class SignInPolicies extends Object
The sign-in policy of the applications of this server (SignIn L-6; section 5 of the SignIn flow design, its decision D-11): the settings of the server, $signIn.* in the server settings, with what the application overrides, signIn.* in its moduleApp settings. The policy is resolved when it is asked for, from the settings as they are then: a changed setting needs no restart of anything that reads it here.

Development mode (the owner's ruling DEV-2FA-1 of 2026-10-18, CC-FIX-SIGNIN-V5-UX item 7): on a server run from Eclipse, not built into jars (SystemConfig.isDevelopmentMode, the gate of the seed-password rule of 2026-10-08, SeedPasswordCheck), the administrators' second factor is NOT required by default - a debug server asked the owner for a code at every check, and nothing can type one for a scripted check. A secondFactorAdministrators that the server settings ($signIn.secondFactorAdministrators) or the application (signIn.secondFactorAdministrators) set still decides; a built server keeps the default of SignInPolicy, required (D-11).

Author:
Christopher Mindus
  • Method Details

    • of

      public static SignInPolicy of(AppFactory app)
      Gets the sign-in policy of an application as the settings have it.
      Parameters:
      app - The application, null for the policy of the server alone.
      Returns:
      The policy, never null; the default policy when the server is not started.
    • offered

      public static SignInPolicy offered(AppFactory app)
      Gets the sign-in policy of an application with its methods of a second factor narrowed to the ones this server can do: what is offered to a user. A passkey is one where the application offers passkeys (CC-FIX-SIGNIN-2FA-CHOICE): it is the passkey service's, the codes are UserMFA's.
      Parameters:
      app - The application, null for the policy of the server alone.
      Returns:
      The policy, never null.