Skip to content

Refactor OAuth grant infrastructure into pkg/oauthproto #5677

Description

@jhrozek

Description

Prerequisite refactoring for XAA / ID-JAG support (#5218). Consolidates OAuth 2.0 grant machinery into a single home so the upcoming RFC 7523 JWT Bearer grant and RFC 8693 token exchange sit alongside shared primitives rather than being scattered across packages.

Two changes bundled as one logical unit:

  • Use shared pkg/oauthproto helpers in tokenexchange — switches tokenexchange off local HTTP client and redaction constants onto the shared oauthproto.DefaultHTTPClient() and oauthproto.Redact() helpers. Every grant now uses the same process-wide transport and connection pool.
  • Move tokenexchange under pkg/oauthproto — relocates pkg/auth/tokenexchangepkg/oauthproto/tokenexchange. Pure rename; all import paths updated. With this move pkg/oauthproto becomes the single home for all OAuth 2.0 grant machinery.

Closed by

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

authenticationgoPull requests that update go codeneeds-triageIssue needs initial triage by a maintainer

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions