package com.airlock.iam.common.application.configuration.event;

import com.airlock.iam.plugin.api.annotation.config.Plugin;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

@Plugin(
   description = "<p>Event that is triggered by a password change through the Adminapp or the Loginapp in one of the following situations:\n</p>\n<p>\nLoginapp:\n<ul>\n\t<li><b>Mandatory Password Change</b>: As part of an authentication flow, e.g. due to a password policy change.</li>\n\t<li><b>Voluntary Password Change</b>: As part of a protected self-service or an authentication flow.</li>\n\t<li><b>Password Reset</b>: As part of a public self-service flow, e.g. in case the user forgot the password.</li>\n</ul>\nHint: If the above scenarios should be handled differently, consider using a \"Filtered Flow Event\".\n</p>\n<p>\nAdminapp:\n<ul>\n\t<li><b>Password Reset by Admin</b>: An administrator sets a new password for a user.</li>\n\t<li><b>Password Generated by Admin</b>: An administrator generates a new random password for a user.</li>\n</ul>\n</p>",
   displayName = "Password Changed"
)
public class PasswordChangedSubscribedEventConfig implements LoginappUserSubscribedEventConfig, AdminappUserSubscribedEventConfig {
   @SuppressFBWarnings(justification = "generated code")
   public static PasswordChangedSubscribedEventConfig.PasswordChangedSubscribedEventConfigBuilder builder() {
      return new PasswordChangedSubscribedEventConfig.PasswordChangedSubscribedEventConfigBuilder();
   }

   @SuppressFBWarnings(justification = "generated code")
   public static class PasswordChangedSubscribedEventConfigBuilder {
      @SuppressFBWarnings(justification = "generated code")
      PasswordChangedSubscribedEventConfigBuilder() {
      }

      @SuppressFBWarnings(justification = "generated code")
      public PasswordChangedSubscribedEventConfig build() {
         return new PasswordChangedSubscribedEventConfig();
      }

      @SuppressFBWarnings(justification = "generated code")
      @Override
      public String toString() {
         return "PasswordChangedSubscribedEventConfig.PasswordChangedSubscribedEventConfigBuilder()";
      }
   }
}
