Record Class MailerSpec.OAuth2

java.lang.Object
java.lang.Record
io.leandev.appfuse.mail.MailerSpec.OAuth2
Record Components:
clientId - client id
clientSecret - client secret
tenantId - 授權伺服器的租戶(如 Azure AD tenant);與資料隔離無關
scope - scope
tokenEndpoint - token 端點
account - 寄件帳號(OAuth2 的 username)
Enclosing class:
MailerSpec

public static record MailerSpec.OAuth2(String clientId, String clientSecret, String tenantId, String scope, String tokenEndpoint, String account) extends Record
OAuth2 認證(client_credentials)
  • Constructor Details

    • OAuth2

      public OAuth2(String clientId, String clientSecret, String tenantId, String scope, String tokenEndpoint, String account)
      Creates an instance of a OAuth2 record class.
      Parameters:
      clientId - the value for the clientId record component
      clientSecret - the value for the clientSecret record component
      tenantId - the value for the tenantId record component
      scope - the value for the scope record component
      tokenEndpoint - the value for the tokenEndpoint record component
      account - the value for the account 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.
    • clientId

      public String clientId()
      Returns the value of the clientId record component.
      Returns:
      the value of the clientId record component
    • clientSecret

      public String clientSecret()
      Returns the value of the clientSecret record component.
      Returns:
      the value of the clientSecret record component
    • tenantId

      public String tenantId()
      Returns the value of the tenantId record component.
      Returns:
      the value of the tenantId record component
    • scope

      public String scope()
      Returns the value of the scope record component.
      Returns:
      the value of the scope record component
    • tokenEndpoint

      public String tokenEndpoint()
      Returns the value of the tokenEndpoint record component.
      Returns:
      the value of the tokenEndpoint record component
    • account

      public String account()
      Returns the value of the account record component.
      Returns:
      the value of the account record component