Interface AuthenticationInfoMapper_v0_3
- All Known Implementing Classes:
AuthenticationInfoMapper_v0_3Impl
public interface AuthenticationInfoMapper_v0_3
Bidirectional mapper for converting AuthenticationInfo between A2A Protocol v0.3 and v1.0.
Key differences:
- v0.3:
AuthenticationInfo(List<String> schemes, String credentials)- supports multiple schemes - v1.0:
AuthenticationInfo(String scheme, String credentials)- single scheme only
Conversion strategy:
- v0.3 → v1.0: Takes the first scheme from the list (or empty string if list is empty)
- v1.0 → v0.3: Wraps the single scheme in a list
Note: v0.3 also has PushNotificationAuthenticationInfo which has the same structure
as v0.3 AuthenticationInfo, so this mapper handles both.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AuthenticationInfoMapper_v0_3Singleton instance accessed viaA2AMappers_v0_3factory. -
Method Summary
Modifier and TypeMethodDescriptiondefault AuthenticationInfo_v0_3Converts v1.0 AuthenticationInfo to v0.3 AuthenticationInfo.Converts v1.0 AuthenticationInfo to v0.3 PushNotificationAuthenticationInfo.default AuthenticationInfoConverts v0.3 AuthenticationInfo to v1.0 AuthenticationInfo.default AuthenticationInfoConverts v0.3 PushNotificationAuthenticationInfo to v1.0 AuthenticationInfo.
-
Field Details
-
INSTANCE
Singleton instance accessed viaA2AMappers_v0_3factory.
-
-
Method Details
-
toV10
Converts v0.3 AuthenticationInfo to v1.0 AuthenticationInfo.Takes the first scheme from the v0.3 schemes list. If the list is empty or null, uses an empty string for the v1.0 scheme.
- Parameters:
v03- the v0.3 authentication info- Returns:
- the equivalent v1.0 authentication info
-
toV10FromPushNotification
Converts v0.3 PushNotificationAuthenticationInfo to v1.0 AuthenticationInfo.Takes the first scheme from the v0.3 schemes list. If the list is empty or null, uses an empty string for the v1.0 scheme.
- Parameters:
v03- the v0.3 push notification authentication info- Returns:
- the equivalent v1.0 authentication info
-
fromV10
Converts v1.0 AuthenticationInfo to v0.3 AuthenticationInfo.Wraps the v1.0 single scheme in a list for v0.3.
- Parameters:
v10- the v1.0 authentication info- Returns:
- the equivalent v0.3 authentication info
-
fromV10ToPushNotification
Converts v1.0 AuthenticationInfo to v0.3 PushNotificationAuthenticationInfo.Wraps the v1.0 single scheme in a list for v0.3.
- Parameters:
v10- the v1.0 authentication info- Returns:
- the equivalent v0.3 push notification authentication info
-