Class UserAccountEmailOtpPlugin

java.lang.Object
io.meeds.social.security.plugin.EmailOtpPlugin
io.meeds.social.security.plugin.UserAccountEmailOtpPlugin
All Implemented Interfaces:
io.meeds.web.security.plugin.OtpPlugin

@Service public class UserAccountEmailOtpPlugin extends EmailOtpPlugin
Same OTP mechanics as EmailOtpPlugin (generation, TTL, length, send interval, single-use consumption) and the same email wording, under its own subject, for the confirmation of an administrator session before actions on user accounts. Its template is a copy of the base one under its own path, so a deployment can replace this email on its own, as it can the other code emails. The code is stored under a purpose-bound cache key, so a code sent for another flow never confirms an administrator session.
  • Field Details

  • Constructor Details

    • UserAccountEmailOtpPlugin

      public UserAccountEmailOtpPlugin()
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface io.meeds.web.security.plugin.OtpPlugin
      Overrides:
      getName in class EmailOtpPlugin
    • getEmailBodyPath

      public String getEmailBodyPath()
    • getEmailSubjectKey

      protected String getEmailSubjectKey()
      Overrides:
      getEmailSubjectKey in class EmailOtpPlugin
    • releasesSendLockOnWrongCode

      protected boolean releasesSendLockOnWrongCode()
      The confirmation dialog offers a new code right after a wrong one, so this method alone lifts its send lock on a wrong code
      Overrides:
      releasesSendLockOnWrongCode in class EmailOtpPlugin