Skip to content

Auth integration: Update router and wire up middleware #54

@jhrozek

Description

@jhrozek

Update the router setup in cmd/thv-registry-api/api/v1/routes.go to use the auth middleware.

The router needs to separate public routes (/health, /docs/, /.well-known/oauth-protected-resource) from protected routes. Use Chi route groups to cleanly organize this. Whether /v0/ and /private/* are protected should come from the protectedPaths config.

Update cmd/thv-registry-api/main.go to initialize the ConfigManager from PR #47 and pass it to the router setup so we can read the auth config.

The RFC 9728 metadata handler should be mounted at /.well-known/oauth-protected-resource (this is always public).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions