Record Class OttProviders

java.lang.Object
java.lang.Record
com.irurueta.authserver.authorization.api.web.ott.OttProviders
Record Components:
link - confirms a magic link (OttLinkAuthenticationProvider).
code - signs a user in with a numeric code (OttCodeAuthenticationProvider).
secondFactor - verifies a numeric code as a second factor (OttSecondFactorAuthenticationProvider).

public record OttProviders(org.springframework.security.authentication.AuthenticationProvider link, org.springframework.security.authentication.AuthenticationProvider code, org.springframework.security.authentication.AuthenticationProvider secondFactor) extends Record
The authentication providers of the one-time token methods, held together. They are deliberately not declared as AuthenticationProvider beans: Spring Security takes a single such bean as the parent of every authentication manager, and the second-factor provider belongs to its own filter's manager only.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final org.springframework.security.authentication.AuthenticationProvider
    The field for the code record component.
    private final org.springframework.security.authentication.AuthenticationProvider
    The field for the link record component.
    private final org.springframework.security.authentication.AuthenticationProvider
    The field for the secondFactor record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    OttProviders(org.springframework.security.authentication.AuthenticationProvider link, org.springframework.security.authentication.AuthenticationProvider code, org.springframework.security.authentication.AuthenticationProvider secondFactor)
    Creates an instance of a OttProviders record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.security.authentication.AuthenticationProvider
    Returns the value of the code record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    org.springframework.security.authentication.AuthenticationProvider
    Returns the value of the link record component.
    org.springframework.security.authentication.AuthenticationProvider
    Returns the value of the secondFactor record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • code

      private final org.springframework.security.authentication.AuthenticationProvider code
      The field for the code record component.
    • secondFactor

      private final org.springframework.security.authentication.AuthenticationProvider secondFactor
      The field for the secondFactor record component.
  • Constructor Details

    • OttProviders

      public OttProviders(org.springframework.security.authentication.AuthenticationProvider link, org.springframework.security.authentication.AuthenticationProvider code, org.springframework.security.authentication.AuthenticationProvider secondFactor)
      Creates an instance of a OttProviders record class.
      Parameters:
      link - the value for the link record component
      code - the value for the code record component
      secondFactor - the value for the secondFactor record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
    • link

      public org.springframework.security.authentication.AuthenticationProvider link()
      Returns the value of the link record component.
      Returns:
      the value of the link record component
    • code

      public org.springframework.security.authentication.AuthenticationProvider code()
      Returns the value of the code record component.
      Returns:
      the value of the code record component
    • secondFactor

      public org.springframework.security.authentication.AuthenticationProvider secondFactor()
      Returns the value of the secondFactor record component.
      Returns:
      the value of the secondFactor record component