Record Class TwilioProperties
java.lang.Object
java.lang.Record
com.irurueta.authserver.authorization.infrastructure.sms.TwilioProperties
- Record Components:
accountSid- Twilio account SID.authToken- Twilio auth token (secret).from- sender phone number in E.164, or blank when a messaging service is used.messagingServiceSid- SID of the messaging service, or blank when a sender number is used.
@ConfigurationProperties(prefix="authserver.sms.twilio")
public record TwilioProperties(String accountSid, String authToken, String from, String messagingServiceSid)
extends Record
Twilio credentials and sender, bound from the environment variables
AUTHSERVER_SMS_TWILIO_* only; no value
is ever written in a file of this repository. Used by the twilio profile.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for theaccountSidrecord component.private final StringThe field for theauthTokenrecord component.private final StringThe field for thefromrecord component.private final StringThe field for themessagingServiceSidrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionTwilioProperties(String accountSid, String authToken, String from, String messagingServiceSid) Creates an instance of aTwilioPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccountSidrecord component.Returns the value of theauthTokenrecord component.final booleanIndicates whether some other object is "equal to" this one.from()Returns the value of thefromrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of themessagingServiceSidrecord component.toString()Returns a string representation of this record class.
-
Field Details
-
accountSid
The field for theaccountSidrecord component. -
authToken
The field for theauthTokenrecord component. -
from
The field for thefromrecord component. -
messagingServiceSid
The field for themessagingServiceSidrecord component.
-
-
Constructor Details
-
TwilioProperties
public TwilioProperties(String accountSid, String authToken, String from, String messagingServiceSid) Creates an instance of aTwilioPropertiesrecord class.- Parameters:
accountSid- the value for theaccountSidrecord componentauthToken- the value for theauthTokenrecord componentfrom- the value for thefromrecord componentmessagingServiceSid- the value for themessagingServiceSidrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
accountSid
Returns the value of theaccountSidrecord component.- Returns:
- the value of the
accountSidrecord component
-
authToken
Returns the value of theauthTokenrecord component.- Returns:
- the value of the
authTokenrecord component
-
from
Returns the value of thefromrecord component.- Returns:
- the value of the
fromrecord component
-
messagingServiceSid
Returns the value of themessagingServiceSidrecord component.- Returns:
- the value of the
messagingServiceSidrecord component
-