Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions with-agents-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ upstream hop dropped (`invalid_scope`), and delegated tokens live 5 minutes.
## Quickstart

Requires a server built from main (`make dev` in the server repo → :8080)
and the **unreleased** Python SDK from local main (token-exchange support
merged, not yet on PyPI — switch to `pip install authorizer-py` at the next
release):
and the Authorizer Python SDK (token-exchange support ships in
`authorizer-py>=0.3.0rc3`):

```bash
python3 -m venv .venv
.venv/bin/pip install -e ../../../authorizer-python
.venv/bin/pip install -r requirements.txt

export AUTHORIZER_CLIENT_ID=kbyuFDidLLm280LIwVFiazOqjO3ty8KH # make-dev default
export AUTHORIZER_ADMIN_SECRET=admin
Expand Down
7 changes: 3 additions & 4 deletions with-agents-python/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
python demo.py --async # same flow on the async client

Requires an Authorizer server built from main (`make dev` in the server
repo) and the UNRELEASED Python SDK from local main:
repo) and the Authorizer Python SDK (token exchange ships in
`authorizer-py>=0.3.0rc3`):

pip install -e ../../../authorizer-python

(Advice: switch to `pip install authorizer-py` once the next release ships.)
pip install -r requirements.txt
"""

from __future__ import annotations
Expand Down
3 changes: 3 additions & 0 deletions with-agents-python/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Official Authorizer Python SDK: https://pypi.org/project/authorizer-py/
# Token-exchange (RFC 8693) support ships in >=0.3.0rc3.
authorizer-py>=0.3.0rc3
14 changes: 7 additions & 7 deletions with-express-js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion with-express-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"author": "Lakhan Samani",
"license": "ISC",
"dependencies": {
"@authorizerdev/authorizer-js": "^3.2.1",
"@authorizerdev/authorizer-js": "^3.3.0-rc.4",
"express": "^4.18.2"
}
}
30 changes: 15 additions & 15 deletions with-gatsbyjs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion with-gatsbyjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"clean": "gatsby clean"
},
"dependencies": {
"@authorizerdev/authorizer-react": "^2.0.7",
"@authorizerdev/authorizer-react": "^2.2.0-rc.3",
"@mdx-js/mdx": "^1.6.22",
"@mdx-js/react": "^1.6.22",
"babel-plugin-styled-components": "^2.0.2",
Expand Down
6 changes: 3 additions & 3 deletions with-go/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Authorizer Example with Go

Signup, login and profile with the [Go SDK](https://github.com/authorizerdev/authorizer-go) (release `2.1.0`) over the GraphQL protocol, plus the admin client listing users.
Signup, login and profile with the [Go SDK](https://github.com/authorizerdev/authorizer-go) (release `v2.2.0-rc.4`) over the GraphQL protocol, plus the admin client listing users.

## Run an Authorizer instance

Expand All @@ -20,7 +20,7 @@ Defaults match `make dev`; override with `AUTHORIZER_URL`, `CLIENT_ID`, `ADMIN_S

## Notes

- The SDK release is tagged `2.1.0` (no `v` prefix), so Go resolves it as the pseudo-version `v0.0.0-20260616165143-dc16e71b66f7` you see in `go.mod` — same code, exact commit of the release tag.
- The SDK is v2+, so the module path carries the `/v2` suffix: import `github.com/authorizerdev/authorizer-go/v2` and require `github.com/authorizerdev/authorizer-go/v2 v2.2.0-rc.4` in `go.mod`.
- The client supports three wire protocols: `graphql` (default, used here), `rest`, and `grpc` (`authorizer.WithProtocol`).
- Admin operations (`admin.Users`, etc.) authenticate with the `x-authorizer-admin-secret` header, handled by `NewAuthorizerAdminClient`.
- **Do not use `GetToken` in `2.1.0`** — it is a non-functional stub in that release (fixed on the SDK's unreleased `main`). Get tokens via `Login`, or call `POST /oauth/token` directly for machine flows (see the `with-m2m-client-credentials` example).
- `GetToken` is functional in `v2.2.0-rc.4` (including `client_credentials`); you can also get tokens via `Login`, or call `POST /oauth/token` directly for machine flows (see the `with-m2m-client-credentials` example).
3 changes: 2 additions & 1 deletion with-go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ module github.com/authorizerdev/examples/with-go

go 1.25.5

require github.com/authorizerdev/authorizer-go v0.0.0-20260616165143-dc16e71b66f7
require github.com/authorizerdev/authorizer-go/v2 v2.2.0-rc.4

require (
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260415201107-50325440f8f2.1 // indirect
github.com/authorizerdev/authorizer-proto-go v0.1.0 // indirect
golang.org/x/net v0.51.0 // indirect
golang.org/x/sys v0.42.0 // indirect
golang.org/x/text v0.34.0 // indirect
Expand Down
6 changes: 4 additions & 2 deletions with-go/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260415201107-50325440f8f2.1 h1:s6hzCXtND/ICdGPTMGk7C+/BFlr2Jg5GyH0NKf4XGXg=
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260415201107-50325440f8f2.1/go.mod h1:tvtbpgaVXZX4g6Pn+AnzFycuRK3MOz5HJfEGeEllXYM=
github.com/authorizerdev/authorizer-go v0.0.0-20260616165143-dc16e71b66f7 h1:JWSpSX7Vz3WczigC1brqR86Dxm43CJNT7XP79xB1fJk=
github.com/authorizerdev/authorizer-go v0.0.0-20260616165143-dc16e71b66f7/go.mod h1:Ao/GjPMrTqctfhzC/fv+RdjpQ7/LvpNBKEmuhbQO0RU=
github.com/authorizerdev/authorizer-go/v2 v2.2.0-rc.4 h1:w8qQmAdP9OFiejsPuSsQqCRdWT29f7gHHFf1UTc8KGU=
github.com/authorizerdev/authorizer-go/v2 v2.2.0-rc.4/go.mod h1:1gnCE9aCctLn9TZRdyjkbyJIQnFJtK2nXkXoGvj40uQ=
github.com/authorizerdev/authorizer-proto-go v0.1.0 h1:oLGE2OuwCnE6Yr1tRt3fL0zh7L/HpPQfoeS4pgxszlQ=
github.com/authorizerdev/authorizer-proto-go v0.1.0/go.mod h1:cVUPv4XVeH3YeoFjfnl+ug/KlUinrGOAUZu3E+sjjHs=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
Expand Down
2 changes: 1 addition & 1 deletion with-go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"os"
"time"

authorizer "github.com/authorizerdev/authorizer-go"
authorizer "github.com/authorizerdev/authorizer-go/v2"
)

func env(key, fallback string) string {
Expand Down
5 changes: 0 additions & 5 deletions with-k8s-tokenreview/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# NOTE: go.mod carries a `replace => ../../../authorizer-go` for the unreleased
# SDK client_assertion support. That path is outside this build context, so run
# go mod vendor
# in this directory first (the vendor/ dir makes the replace path irrelevant),
# or drop the replace once the next authorizer-go tag ships.
FROM golang:1.25-alpine AS build
WORKDIR /src
COPY . .
Expand Down
9 changes: 2 additions & 7 deletions with-k8s-tokenreview/app/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ module github.com/authorizerdev/examples/with-k8s-tokenreview/app
go 1.25.5

require (
github.com/authorizerdev/authorizer-go v0.0.0
github.com/authorizerdev/authorizer-go/v2 v2.2.0-rc.4
github.com/golang-jwt/jwt/v4 v4.5.2
)

require (
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260415201107-50325440f8f2.1 // indirect
github.com/authorizerdev/authorizer-proto-go v0.1.0 // indirect
golang.org/x/net v0.51.0 // indirect
golang.org/x/sys v0.42.0 // indirect
golang.org/x/text v0.34.0 // indirect
Expand All @@ -17,9 +18,3 @@ require (
google.golang.org/grpc v1.81.1 // indirect
google.golang.org/protobuf v1.36.11 // indirect
)

// The client_assertion fields (GetTokenRequest.ClientAssertion /
// ClientAssertionType, GrantTypeClientCredentials) are on authorizer-go main
// but not yet in a tagged release. Drop this replace (and pin the next
// released tag) once it ships.
replace github.com/authorizerdev/authorizer-go => ../../../authorizer-go
4 changes: 4 additions & 0 deletions with-k8s-tokenreview/app/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260415201107-50325440f8f2.1 h1:s6hzCXtND/ICdGPTMGk7C+/BFlr2Jg5GyH0NKf4XGXg=
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260415201107-50325440f8f2.1/go.mod h1:tvtbpgaVXZX4g6Pn+AnzFycuRK3MOz5HJfEGeEllXYM=
github.com/authorizerdev/authorizer-go/v2 v2.2.0-rc.4 h1:w8qQmAdP9OFiejsPuSsQqCRdWT29f7gHHFf1UTc8KGU=
github.com/authorizerdev/authorizer-go/v2 v2.2.0-rc.4/go.mod h1:1gnCE9aCctLn9TZRdyjkbyJIQnFJtK2nXkXoGvj40uQ=
github.com/authorizerdev/authorizer-proto-go v0.1.0 h1:oLGE2OuwCnE6Yr1tRt3fL0zh7L/HpPQfoeS4pgxszlQ=
github.com/authorizerdev/authorizer-proto-go v0.1.0/go.mod h1:cVUPv4XVeH3YeoFjfnl+ug/KlUinrGOAUZu3E+sjjHs=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
Expand Down
2 changes: 1 addition & 1 deletion with-k8s-tokenreview/app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"strings"
"time"

authorizer "github.com/authorizerdev/authorizer-go"
authorizer "github.com/authorizerdev/authorizer-go/v2"
"github.com/golang-jwt/jwt/v4"
)

Expand Down
4 changes: 0 additions & 4 deletions with-microservices-go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,3 @@ demo.sh end-to-end happy path + negative paths
All services use structured JSON logging (`log/slog`) with a propagated
`X-Request-ID`, context propagation on outbound calls, and graceful shutdown
on SIGINT/SIGTERM.

> **Note**: `go.mod` uses a `replace` pointing at a local checkout of
> authorizer-go, which carries the `client_credentials` support in
> `GetToken`. Drop the `replace` once the next authorizer-go release ships.
8 changes: 2 additions & 6 deletions with-microservices-go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@ module github.com/authorizerdev/examples/with-microservices-go

go 1.25.5

// Local main of the Go SDK: it carries the working client_credentials support
// in GetToken (GrantTypeClientCredentials). Drop this replace once the next
// authorizer-go release ships.
replace github.com/authorizerdev/authorizer-go => ../../authorizer-go

require (
github.com/authorizerdev/authorizer-go v0.0.0-00010101000000-000000000000
github.com/authorizerdev/authorizer-go/v2 v2.2.0-rc.4
github.com/golang-jwt/jwt/v5 v5.2.2
)

require (
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260415201107-50325440f8f2.1 // indirect
github.com/authorizerdev/authorizer-proto-go v0.1.0 // indirect
golang.org/x/net v0.51.0 // indirect
golang.org/x/sys v0.42.0 // indirect
golang.org/x/text v0.34.0 // indirect
Expand Down
4 changes: 4 additions & 0 deletions with-microservices-go/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260415201107-50325440f8f2.1 h1:s6hzCXtND/ICdGPTMGk7C+/BFlr2Jg5GyH0NKf4XGXg=
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260415201107-50325440f8f2.1/go.mod h1:tvtbpgaVXZX4g6Pn+AnzFycuRK3MOz5HJfEGeEllXYM=
github.com/authorizerdev/authorizer-go/v2 v2.2.0-rc.4 h1:w8qQmAdP9OFiejsPuSsQqCRdWT29f7gHHFf1UTc8KGU=
github.com/authorizerdev/authorizer-go/v2 v2.2.0-rc.4/go.mod h1:1gnCE9aCctLn9TZRdyjkbyJIQnFJtK2nXkXoGvj40uQ=
github.com/authorizerdev/authorizer-proto-go v0.1.0 h1:oLGE2OuwCnE6Yr1tRt3fL0zh7L/HpPQfoeS4pgxszlQ=
github.com/authorizerdev/authorizer-proto-go v0.1.0/go.mod h1:cVUPv4XVeH3YeoFjfnl+ug/KlUinrGOAUZu3E+sjjHs=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
Expand Down
2 changes: 1 addition & 1 deletion with-microservices-go/internal/authx/token_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"sync"
"time"

authorizer "github.com/authorizerdev/authorizer-go"
authorizer "github.com/authorizerdev/authorizer-go/v2"
)

// refreshMargin is how long before expiry a cached token is considered stale.
Expand Down
33 changes: 9 additions & 24 deletions with-nextjs-13/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions with-nextjs-13/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"turboBuild": "tailwindcss input.css --output output.css && next build"
},
"dependencies": {
"@authorizerdev/authorizer-js": "^3.2.1",
"@authorizerdev/authorizer-react": "^2.0.7",
"@authorizerdev/authorizer-js": "^3.3.0-rc.4",
"@authorizerdev/authorizer-react": "^2.2.0-rc.3",
"next": "^13.0.5",
"react": "18.2.0",
"react-dom": "18.2.0"
Expand Down
Loading