Skip to content

Repository files navigation

authz-client.go

CI License Issues PRs Dependabot

Shared identity resolution and authorization client for SweetRPG's Go APIs: verifies bearer tokens against auth-api (POST /authz/check), resolves the subject to the canonical users._id via users-api (GET /profile), and exposes Gin middleware (ResolveViewer, RequireAnyRole) that stashes the identity in the request context alongside Viewer(c), Roles(c), Subject(c), and Token(c) accessors.

Install

go get github.com/sweetrpg/authz-client.go

Documentation

Package documentation: pkg.go.dev/github.com/sweetrpg/authz-client.go. Test coverage reports are published to sweetrpg.github.io/authz-client.go on every merge to develop.

Contributing

See CONTRIBUTING.md for the development workflow and RELEASE.md for how versions get cut.

About

Shared authz resolution for SweetRPG Go services: auth-api /authz/check client + users-api /profile resolver + Gin Viewer/RequireAnyRole middleware

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages