Record Class EmailLinkRequested

java.lang.Object
java.lang.Record
com.irurueta.authserver.authorization.application.ott.EmailLinkRequested
Record Components:
address - the verified e-mail address.
link - the link that opens the confirmation page.
validFor - how long the link stays valid, shown to the user.

public record EmailLinkRequested(String address, URI link, Duration validFor) extends Record
Event published when a magic link must be e-mailed. Like EmailCodeRequested, it is delivered after the transaction commits, outside of it and off the request thread.
  • Field Details

    • address

      private final String address
      The field for the address record component.
    • validFor

      private final Duration validFor
      The field for the validFor record component.
  • Constructor Details

  • Method Details

    • toString

      public String toString()
      Describes the event without the address and the link, so neither ever reaches a log.
      Specified by:
      toString in class Record
      Returns:
      the description.
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • address

      public String address()
      Returns the value of the address record component.
      Returns:
      the value of the address record component
    • link

      public URI link()
      Returns the value of the link record component.
      Returns:
      the value of the link record component
    • validFor

      public Duration validFor()
      Returns the value of the validFor record component.
      Returns:
      the value of the validFor record component