Class ClientEnvLog

java.lang.Object
com.iizix.server.gyro.ClientEnvLog

public final class ClientEnvLog extends Object
The client environment as a log may hold it (CC-FIX-RESET-TOKEN-LOG). The client copies every string member of the page's window, location, navigator and screen into its environment, and the page keeps its entry query - the password reset token prt and the e-mail verification token v of a SignIn link among its members - in window.izEntryQuery; a page whose address bar still carries the query has it in location.href and location.search too. A line that logs the environment logs a bearer credential unless the values are masked first.

The masking is MaskingRequestLog's, the one masking helper of the server: a member whose name is one it masks (pw, password, prt, v, epw, hash) is replaced by MaskingRequestLog.MASK, in a value that is a query, the query of a URL, or the environment entry itself when its own name (its last dotted segment) is such a name. Nothing else is changed, and the environment itself is never changed: what is returned is a copy, and only when something was masked.

Author:
Christopher Mindus
  • Method Details

    • forLog

      public static StringMapProp forLog(StringMapProp env)
      Gets a client environment as a log may hold it: the same property when it holds nothing to mask, otherwise a read-only copy with the same name and entries in the same order, the masked values in place of the secrets.
      Parameters:
      env - The client environment, null for none.
      Returns:
      The environment to hand to a log, null for null.