Record Class BinaryAuthData
- Record Components:
bytes- the credential bytes sent inCommandConnect.auth_data
auth_data bytes for CommandConnect (PIP-478).
The auth-method name is deliberately NOT part of this value — it comes from exactly one place,
BinaryAuthDataProvider.authMethodName(), so a plugin cannot contradict itself (an earlier
draft carried the name on both the provider and the data value, leaving "which one wins?" to the
javadoc). Kept as a record rather than a bare byte[] so fields can be added later without an
API break.
Ownership: the array is handed off, not copied. The producer transfers ownership of
bytes to this value on construction, and the framework reads it without copying; neither
side may mutate the array after construction. (Copying is deliberately avoided — this is a
single-producer-to-single-consumer transfer, matching the v4 AuthData contract.) Because the
component is an array, the record's generated equals/hashCode are reference-based on
the bytes, not value-based; do not compare BinaryAuthData instances for value equality.
-
Constructor Summary
ConstructorsConstructorDescriptionBinaryAuthData(byte[] bytes) Creates an instance of aBinaryAuthDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]bytes()Returns the value of thebytesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BinaryAuthData
public BinaryAuthData(byte[] bytes) Creates an instance of aBinaryAuthDatarecord class.- Parameters:
bytes- the value for thebytesrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
bytes
-