Record Class WpJwtAuthenticationStrategy
java.lang.Object
java.lang.Record
io.github.evisentin.wordpress.client.domain.auth.WpJwtAuthenticationStrategy
- Record Components:
username- WordPress username; must not be blankpassword- WordPress password; must not be blankjwtTokenEndPoint- endpoint for the JWT token, relative to API-URL; must not be blank
- All Implemented Interfaces:
WpAuthenticationStrategy
public record WpJwtAuthenticationStrategy(@NonNull String username, @NonNull String password, @NonNull String jwtTokenEndPoint)
extends Record
implements WpAuthenticationStrategy
Authentication strategy based on JWT bearer token authentication.
Contains the credentials used to obtain a JWT token and the endpoint from which the token is requested.
-
Constructor Summary
ConstructorsConstructorDescriptionWpJwtAuthenticationStrategy(@NonNull String username, @NonNull String password, @NonNull String jwtTokenEndPoint) Creates an instance of aWpJwtAuthenticationStrategyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NonNull StringReturns the value of thejwtTokenEndPointrecord component.@NonNull Stringpassword()Returns the value of thepasswordrecord component.final StringtoString()Returns a string representation of this record class.@NonNull Stringusername()Returns the value of theusernamerecord component.
-
Constructor Details
-
WpJwtAuthenticationStrategy
public WpJwtAuthenticationStrategy(@NonNull @NonNull String username, @NonNull @NonNull String password, @NonNull @NonNull String jwtTokenEndPoint) Creates an instance of aWpJwtAuthenticationStrategyrecord class.- Parameters:
username- the value for theusernamerecord componentpassword- the value for thepasswordrecord componentjwtTokenEndPoint- the value for thejwtTokenEndPointrecord 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). -
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
password
Returns the value of thepasswordrecord component.- Returns:
- the value of the
passwordrecord component
-
jwtTokenEndPoint
Returns the value of thejwtTokenEndPointrecord component.- Returns:
- the value of the
jwtTokenEndPointrecord component
-