Skip to content

[Feat]: Expose programmatic authorization wiring for non-CDI runtimes #965

Description

@Sh1bari

Is your feature request related to a problem? Please describe.

The A2A Java SDK already provides task-level authorization through TaskAuthorizationProvider and AuthorizationRequestHandlerDecorator.

This works well in CDI runtimes, where the container wires decorators automatically.

However, non-CDI integrations (for example Spring Boot) create DefaultRequestHandler and TaskStore programmatically, which makes it impossible to reuse the existing authorization flow because the framework-neutral constructors are not public.

Describe the solution you'd like

Expose the programmatic APIs by making these constructors public:

  • AuthorizationRequestHandlerDecorator(RequestHandler, TaskAuthorizationProvider)
  • InMemoryTaskStore(TaskAuthorizationProvider)

Additionally, it would be useful to allow AuthenticatedUser to carry optional attributes (e.g. roles, scopes, tenant, clientId) so integrations can pass richer identity context into TaskAuthorizationProvider.

Why

This would allow framework integrations to reuse the existing SDK authorization model without introducing framework-specific code or duplicating authorization logic.

Describe alternatives you've considered

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added theissue type on Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions