Package org.a2aproject.sdk.spec
Record Class MutualTLSSecurityScheme
java.lang.Object
java.lang.Record
org.a2aproject.sdk.spec.MutualTLSSecurityScheme
- Record Components:
description- optional description of the security scheme
- All Implemented Interfaces:
SecurityScheme
Mutual TLS (mTLS) security scheme for agent authentication.
This security scheme uses mutual TLS authentication, where both the client and server present X.509 certificates to authenticate each other. This provides strong, certificate-based authentication at the transport layer.
Unlike other authentication schemes that operate at the HTTP layer, mTLS authentication occurs during the TLS handshake before any HTTP communication begins. This makes it particularly suitable for high-security environments and machine-to-machine communication.
Example usage:
MutualTLSSecurityScheme scheme = new MutualTLSSecurityScheme(
"Client certificate authentication required"
);
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMutualTLSSecurityScheme(String description) Creates an instance of aMutualTLSSecuritySchemerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord 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.type()Returns the type of the security scheme.
-
Field Details
-
TYPE
The type identifier for mutual TLS security schemes: "mtlsSecurityScheme".- See Also:
-
-
Constructor Details
-
MutualTLSSecurityScheme
Creates an instance of aMutualTLSSecuritySchemerecord class.- Parameters:
description- the value for thedescriptionrecord component
-
-
Method Details
-
type
Description copied from interface:SecuritySchemeReturns the type of the security scheme.- Specified by:
typein interfaceSecurityScheme- Returns:
- the type of the security scheme.
-
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). -
description
Returns the value of thedescriptionrecord component.- Specified by:
descriptionin interfaceSecurityScheme- Returns:
- the value of the
descriptionrecord component
-