Class AuthorizationRequestHandlerDecorator
java.lang.Object
org.a2aproject.sdk.server.requesthandlers.AuthorizationRequestHandlerDecorator
- All Implemented Interfaces:
RequestHandler
@Decorator
@Priority(50)
public class AuthorizationRequestHandlerDecorator
extends Object
implements RequestHandler
-
Constructor Summary
ConstructorsConstructorDescriptionAuthorizationRequestHandlerDecorator(RequestHandler delegate, @Nullable TaskAuthorizationProvider authorizationProvider) Creates an authorization decorator programmatically. -
Method Summary
Modifier and TypeMethodDescriptionvoidauthorizeTaskAccess(@Nullable String requestedTaskId, ServerCallContext context, TaskOperation operation) org.a2aproject.sdk.spec.TaskonCancelTask(org.a2aproject.sdk.spec.CancelTaskParams params, ServerCallContext context) org.a2aproject.sdk.spec.TaskPushNotificationConfigonCreateTaskPushNotificationConfig(org.a2aproject.sdk.spec.TaskPushNotificationConfig params, ServerCallContext context) voidonDeleteTaskPushNotificationConfig(org.a2aproject.sdk.spec.DeleteTaskPushNotificationConfigParams params, ServerCallContext context) org.a2aproject.sdk.spec.TaskonGetTask(org.a2aproject.sdk.spec.TaskQueryParams params, ServerCallContext context) org.a2aproject.sdk.spec.TaskPushNotificationConfigonGetTaskPushNotificationConfig(org.a2aproject.sdk.spec.GetTaskPushNotificationConfigParams params, ServerCallContext context) org.a2aproject.sdk.spec.ListTaskPushNotificationConfigsResultonListTaskPushNotificationConfigs(org.a2aproject.sdk.spec.ListTaskPushNotificationConfigsParams params, ServerCallContext context) org.a2aproject.sdk.jsonrpc.common.wrappers.ListTasksResultonListTasks(org.a2aproject.sdk.spec.ListTasksParams params, ServerCallContext context) org.a2aproject.sdk.spec.EventKindonMessageSend(org.a2aproject.sdk.spec.MessageSendParams params, ServerCallContext context) Flow.Publisher<org.a2aproject.sdk.spec.StreamingEventKind>onMessageSendStream(org.a2aproject.sdk.spec.MessageSendParams params, ServerCallContext context) Flow.Publisher<org.a2aproject.sdk.spec.StreamingEventKind>onSubscribeToTask(org.a2aproject.sdk.spec.TaskIdParams params, ServerCallContext context)
-
Constructor Details
-
AuthorizationRequestHandlerDecorator
public AuthorizationRequestHandlerDecorator() -
AuthorizationRequestHandlerDecorator
public AuthorizationRequestHandlerDecorator(RequestHandler delegate, @Nullable TaskAuthorizationProvider authorizationProvider) Creates an authorization decorator programmatically.This constructor is intended for integrations with non-CDI runtimes such as Spring Framework.
- Parameters:
delegate- request handler being protectedauthorizationProvider- task authorization provider;nulldisables authorization
-
-
Method Details
-
onGetTask
public org.a2aproject.sdk.spec.Task onGetTask(org.a2aproject.sdk.spec.TaskQueryParams params, ServerCallContext context) throws org.a2aproject.sdk.spec.A2AError - Specified by:
onGetTaskin interfaceRequestHandler- Throws:
org.a2aproject.sdk.spec.A2AError
-
onListTasks
public org.a2aproject.sdk.jsonrpc.common.wrappers.ListTasksResult onListTasks(org.a2aproject.sdk.spec.ListTasksParams params, ServerCallContext context) throws org.a2aproject.sdk.spec.A2AError - Specified by:
onListTasksin interfaceRequestHandler- Throws:
org.a2aproject.sdk.spec.A2AError
-
onCancelTask
public org.a2aproject.sdk.spec.Task onCancelTask(org.a2aproject.sdk.spec.CancelTaskParams params, ServerCallContext context) throws org.a2aproject.sdk.spec.A2AError - Specified by:
onCancelTaskin interfaceRequestHandler- Throws:
org.a2aproject.sdk.spec.A2AError
-
onMessageSend
public org.a2aproject.sdk.spec.EventKind onMessageSend(org.a2aproject.sdk.spec.MessageSendParams params, ServerCallContext context) throws org.a2aproject.sdk.spec.A2AError - Specified by:
onMessageSendin interfaceRequestHandler- Throws:
org.a2aproject.sdk.spec.A2AError
-
onMessageSendStream
public Flow.Publisher<org.a2aproject.sdk.spec.StreamingEventKind> onMessageSendStream(org.a2aproject.sdk.spec.MessageSendParams params, ServerCallContext context) throws org.a2aproject.sdk.spec.A2AError - Specified by:
onMessageSendStreamin interfaceRequestHandler- Throws:
org.a2aproject.sdk.spec.A2AError
-
onCreateTaskPushNotificationConfig
public org.a2aproject.sdk.spec.TaskPushNotificationConfig onCreateTaskPushNotificationConfig(org.a2aproject.sdk.spec.TaskPushNotificationConfig params, ServerCallContext context) throws org.a2aproject.sdk.spec.A2AError - Specified by:
onCreateTaskPushNotificationConfigin interfaceRequestHandler- Throws:
org.a2aproject.sdk.spec.A2AError
-
onGetTaskPushNotificationConfig
public org.a2aproject.sdk.spec.TaskPushNotificationConfig onGetTaskPushNotificationConfig(org.a2aproject.sdk.spec.GetTaskPushNotificationConfigParams params, ServerCallContext context) throws org.a2aproject.sdk.spec.A2AError - Specified by:
onGetTaskPushNotificationConfigin interfaceRequestHandler- Throws:
org.a2aproject.sdk.spec.A2AError
-
onSubscribeToTask
public Flow.Publisher<org.a2aproject.sdk.spec.StreamingEventKind> onSubscribeToTask(org.a2aproject.sdk.spec.TaskIdParams params, ServerCallContext context) throws org.a2aproject.sdk.spec.A2AError - Specified by:
onSubscribeToTaskin interfaceRequestHandler- Throws:
org.a2aproject.sdk.spec.A2AError
-
onListTaskPushNotificationConfigs
public org.a2aproject.sdk.spec.ListTaskPushNotificationConfigsResult onListTaskPushNotificationConfigs(org.a2aproject.sdk.spec.ListTaskPushNotificationConfigsParams params, ServerCallContext context) throws org.a2aproject.sdk.spec.A2AError - Specified by:
onListTaskPushNotificationConfigsin interfaceRequestHandler- Throws:
org.a2aproject.sdk.spec.A2AError
-
onDeleteTaskPushNotificationConfig
public void onDeleteTaskPushNotificationConfig(org.a2aproject.sdk.spec.DeleteTaskPushNotificationConfigParams params, ServerCallContext context) throws org.a2aproject.sdk.spec.A2AError - Specified by:
onDeleteTaskPushNotificationConfigin interfaceRequestHandler- Throws:
org.a2aproject.sdk.spec.A2AError
-
authorizeTaskAccess
public void authorizeTaskAccess(@Nullable String requestedTaskId, ServerCallContext context, TaskOperation operation) throws org.a2aproject.sdk.spec.A2AError - Specified by:
authorizeTaskAccessin interfaceRequestHandler- Throws:
org.a2aproject.sdk.spec.A2AError
-