Class MailLinkBase
java.lang.Object
com.iizix.server.user.MailLinkBase
The base URL of every absolute link the server mails (R-145, CC-FIX-SIGNIN-ACCOUNT-MAIL; WK-D-2 of 2026-11-16, CC-FIX-LOCK-PATHS-AND-RESET). A mail its reader ASKED for in a client session (a verification, a reset) takes the ORIGIN that client reached the server by (
of(IClientSessionGyro): scheme, host name and port as the web server read them at the WebSocket upgrade, SessionInfo.getExternalBaseURL()), the server's configured external URL only when the session has none. A mail its reader did NOT ask for - every "if this was not you" account notice - takes the setting $extServerURL (setting(), whatever session the sending thread carries) and that client's origin only when none is configured (notAskedFor(String)): its reader is not that client. The mails about failed sign-ins and locks take configured() on the notifier's own threads, never a client's origin (WK-D-1).No feature depends on the configured value: a mail is never refused for lack of it; it then names no address.
- Author:
- Christopher Mindus
Method Summary
Modifier and TypeMethodDescriptionstatic StringnotAskedFor(String clientBase) Gets the base of the links of a mail its reader did not ask for (WK-D-2): the server's setting$extServerURL, and the base of the client that caused the mail only when none is configured.static Stringof(IClientSessionGyro clientGyro) Gets the base of the links mailed for a client session: the session's origin, else the server's configured external URL.static Stringof(SessionInfo si, String configured) Gets the base of the links mailed for a session, with the configured fallback given: the session's origin first (SessionInfo.getExternalBaseURL()), the fallback only when the session gives none.
Method Details
of
Gets the base of the links mailed for a client session: the session's origin, else the server's configured external URL.- Parameters:
clientGyro- The client session, null for none.- Returns:
- The base as
https://host[:port]without a trailing slash, or null when neither the session nor the server gives one.
of
Gets the base of the links mailed for a session, with the configured fallback given: the session's origin first (SessionInfo.getExternalBaseURL()), the fallback only when the session gives none. A trailing slash is removed; a blank value counts as none.- Parameters:
si- The session, null for none.configured- The server's configured external URL, null or blank for none.- Returns:
- The base without a trailing slash, or null for none.
notAskedFor
Gets the base of the links of a mail its reader did not ask for (WK-D-2): the server's setting$extServerURL, and the base of the client that caused the mail only when none is configured.- Parameters:
clientBase- The base of the client session that caused the mail (of(IClientSessionGyro)), null or blank for none.- Returns:
- The base without a trailing slash, or null for none.