Documentation
¶
Overview ¶
Package authlet is a small, embeddable OAuth 2.1 / OIDC Authorization Server library for Go. Domain-agnostic with a pluggable upstream OIDC IdP.
The library is organized into sub-packages under pkg/. Apps embed pkg/as (the AS endpoints) and pkg/rs (the bearer middleware for protected resources). See https://github.com/eliminyro/authlet for details.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
authletd
command
authletd is a standalone authlet AS for development and integration testing.
|
authletd is a standalone authlet AS for development and integration testing. |
|
examples
|
|
|
hilo-embed
command
Package main is a reference embedding of authlet in a chi-router application like Hilo.
|
Package main is a reference embedding of authlet in a chi-router application like Hilo. |
|
memory-embed
command
Package main is a reference embedding of authlet in a stdlib http.ServeMux application like Memory MCP, with dual-auth (API key OR Bearer JWT) on /mcp.
|
Package main is a reference embedding of authlet in a stdlib http.ServeMux application like Memory MCP, with dual-auth (API key OR Bearer JWT) on /mcp. |
|
pkg
|
|
|
as
Package as implements an OAuth 2.1 / OIDC Authorization Server.
|
Package as implements an OAuth 2.1 / OIDC Authorization Server. |
|
crypto
Package crypto provides an AES-GCM helper for encrypting small at-rest payloads such as RSA private keys.
|
Package crypto provides an AES-GCM helper for encrypting small at-rest payloads such as RSA private keys. |
|
idp
Package idp is a thin generic OIDC RP — authlet's AS uses it to forward user authentication to an upstream issuer (Google, another authlet, etc).
|
Package idp is a thin generic OIDC RP — authlet's AS uses it to forward user authentication to an upstream issuer (Google, another authlet, etc). |
|
jwt
Package jwt provides RS256 signing, JWKS publication, and 30-day key rotation for authlet's authorization server.
|
Package jwt provides RS256 signing, JWKS publication, and 30-day key rotation for authlet's authorization server. |
|
mcp
Package mcp provides Model Context Protocol-flavored helpers on top of authlet's AS.
|
Package mcp provides Model Context Protocol-flavored helpers on top of authlet's AS. |
|
rs
Package rs provides bearer-token middleware for resource servers protected by an authlet AS.
|
Package rs provides bearer-token middleware for resource servers protected by an authlet AS. |
|
storage/memstore
Package memstore is the in-memory reference implementation of pkg/storage.
|
Package memstore is the in-memory reference implementation of pkg/storage. |
Click to show internal directories.
Click to hide internal directories.