v0.1.3 — OAuth2/OIDC authentication
Adds OAuth2/OIDC authentication for goboot APIs (#48, PR #49).
Runtime
Principal(subject/username/roles/scopes/claims) +WithPrincipal/PrincipalFromcontext helpers.Authenticatorseam (request → Principal) with anAnonymousAuthenticatordefault.RoleAuthorizer— enforces@Authorize/@RolesAllowedagainst the context principal (401 unauthenticated, 403 insufficient), perMode.Unauthenticated/Forbidden401/403 error helpers.
HTTP wiring
Generated handlers now enforce route-level @Authorize: authenticate → WithPrincipal → authorize before binding. Secure by default — DefaultHTTPHandlerDependencies ships AnonymousAuthenticator + RoleAuthorizer, so a secured route returns 401 until an authenticator is configured. Also fixes a latent bug where @Authorize on a @RestController method errored as a service proxy.
New module: adapters/oidc (adapters/oidc/v0.1.0)
A runtime.Authenticator over an OIDC provider (Keycloak): discovery + JWKS caching, signature/iss/aud/exp verification, claims → Principal (realm + client roles). Install: go get github.com/zombocoder/goboot/adapters/oidc@v0.1.0 (requires core v0.1.3).
Full test coverage incl. a mock-provider integration test and an httptest 401/403/200 e2e.