diff --git a/with-agents-python/README.md b/with-agents-python/README.md index 05f7dcb..67d04b3 100644 --- a/with-agents-python/README.md +++ b/with-agents-python/README.md @@ -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 diff --git a/with-agents-python/demo.py b/with-agents-python/demo.py index 164e02c..1d3a3a7 100644 --- a/with-agents-python/demo.py +++ b/with-agents-python/demo.py @@ -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 diff --git a/with-agents-python/requirements.txt b/with-agents-python/requirements.txt new file mode 100644 index 0000000..f555330 --- /dev/null +++ b/with-agents-python/requirements.txt @@ -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 diff --git a/with-express-js/package-lock.json b/with-express-js/package-lock.json index 61be9b1..211a60c 100644 --- a/with-express-js/package-lock.json +++ b/with-express-js/package-lock.json @@ -9,14 +9,14 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@authorizerdev/authorizer-js": "^3.2.1", + "@authorizerdev/authorizer-js": "^3.3.0-rc.4", "express": "^4.18.2" } }, "node_modules/@authorizerdev/authorizer-js": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-js/-/authorizer-js-3.2.1.tgz", - "integrity": "sha512-Z7Vpdqs3JsosCcjV63rd7w7mj5n9Vh+RnGDR+qamTbbII+cbwttHpw1jP+61P2uNQLWC3jjp50HvL7xccWAnJQ==", + "version": "3.3.0-rc.4", + "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-js/-/authorizer-js-3.3.0-rc.4.tgz", + "integrity": "sha512-OtI9bZOn5bLFPfMwXj0Eh9VOO04VEmoK3pr8vTsmb5ieejITRvFjMOm/tmCLTzIEE0uk0tToMAD3tkUSqGGBwQ==", "license": "MIT", "dependencies": { "cross-fetch": "^4.1.0" @@ -658,9 +658,9 @@ }, "dependencies": { "@authorizerdev/authorizer-js": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-js/-/authorizer-js-3.2.1.tgz", - "integrity": "sha512-Z7Vpdqs3JsosCcjV63rd7w7mj5n9Vh+RnGDR+qamTbbII+cbwttHpw1jP+61P2uNQLWC3jjp50HvL7xccWAnJQ==", + "version": "3.3.0-rc.4", + "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-js/-/authorizer-js-3.3.0-rc.4.tgz", + "integrity": "sha512-OtI9bZOn5bLFPfMwXj0Eh9VOO04VEmoK3pr8vTsmb5ieejITRvFjMOm/tmCLTzIEE0uk0tToMAD3tkUSqGGBwQ==", "requires": { "cross-fetch": "^4.1.0" } diff --git a/with-express-js/package.json b/with-express-js/package.json index ab39864..b687bd1 100644 --- a/with-express-js/package.json +++ b/with-express-js/package.json @@ -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" } } diff --git a/with-gatsbyjs/package-lock.json b/with-gatsbyjs/package-lock.json index 13c9334..37c2b43 100644 --- a/with-gatsbyjs/package-lock.json +++ b/with-gatsbyjs/package-lock.json @@ -8,7 +8,7 @@ "name": "authorizer-gatsby-demo", "version": "1.0.0", "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", @@ -53,9 +53,9 @@ "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" }, "node_modules/@authorizerdev/authorizer-js": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-js/-/authorizer-js-3.0.4.tgz", - "integrity": "sha512-vkXg1inxC6U2eLra/EQmhTVKzdlpCF4+a93tOfUgSyISYnE8v9np54OAOrs//4aTVOwFTIhahSTvpERKj2NZAQ==", + "version": "3.3.0-rc.4", + "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-js/-/authorizer-js-3.3.0-rc.4.tgz", + "integrity": "sha512-OtI9bZOn5bLFPfMwXj0Eh9VOO04VEmoK3pr8vTsmb5ieejITRvFjMOm/tmCLTzIEE0uk0tToMAD3tkUSqGGBwQ==", "license": "MIT", "dependencies": { "cross-fetch": "^4.1.0" @@ -77,12 +77,12 @@ } }, "node_modules/@authorizerdev/authorizer-react": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-react/-/authorizer-react-2.0.7.tgz", - "integrity": "sha512-+qBrbdE6VyljOge1Ad2AmVIpoheymlLsMxCZHW0hnCeKf0R0wJz3MvoKBiaHAcRF/Bf8Wc6+NBCctAnzXjiwMg==", + "version": "2.2.0-rc.3", + "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-react/-/authorizer-react-2.2.0-rc.3.tgz", + "integrity": "sha512-0WutAKhKYwlmeLJbgcfqEYm5e0mx9MREjUVAJQaZaJcN13Shp3jOn/yHQTayXJHaEsqnQyNHtz1noA1ondkjww==", "license": "MIT", "dependencies": { - "@authorizerdev/authorizer-js": "3.0.4", + "@authorizerdev/authorizer-js": "^3.3.0-rc.4", "@storybook/preset-scss": "^1.0.3", "validator": "^13.11.0" }, @@ -19280,9 +19280,9 @@ } }, "@authorizerdev/authorizer-js": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-js/-/authorizer-js-3.0.4.tgz", - "integrity": "sha512-vkXg1inxC6U2eLra/EQmhTVKzdlpCF4+a93tOfUgSyISYnE8v9np54OAOrs//4aTVOwFTIhahSTvpERKj2NZAQ==", + "version": "3.3.0-rc.4", + "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-js/-/authorizer-js-3.3.0-rc.4.tgz", + "integrity": "sha512-OtI9bZOn5bLFPfMwXj0Eh9VOO04VEmoK3pr8vTsmb5ieejITRvFjMOm/tmCLTzIEE0uk0tToMAD3tkUSqGGBwQ==", "requires": { "cross-fetch": "^4.1.0" }, @@ -19298,11 +19298,11 @@ } }, "@authorizerdev/authorizer-react": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-react/-/authorizer-react-2.0.7.tgz", - "integrity": "sha512-+qBrbdE6VyljOge1Ad2AmVIpoheymlLsMxCZHW0hnCeKf0R0wJz3MvoKBiaHAcRF/Bf8Wc6+NBCctAnzXjiwMg==", + "version": "2.2.0-rc.3", + "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-react/-/authorizer-react-2.2.0-rc.3.tgz", + "integrity": "sha512-0WutAKhKYwlmeLJbgcfqEYm5e0mx9MREjUVAJQaZaJcN13Shp3jOn/yHQTayXJHaEsqnQyNHtz1noA1ondkjww==", "requires": { - "@authorizerdev/authorizer-js": "3.0.4", + "@authorizerdev/authorizer-js": "^3.3.0-rc.4", "@storybook/preset-scss": "^1.0.3", "validator": "^13.11.0" } diff --git a/with-gatsbyjs/package.json b/with-gatsbyjs/package.json index f34be14..f9d2b9a 100644 --- a/with-gatsbyjs/package.json +++ b/with-gatsbyjs/package.json @@ -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", diff --git a/with-go/README.md b/with-go/README.md index d2cd25c..a0832e3 100644 --- a/with-go/README.md +++ b/with-go/README.md @@ -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 @@ -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). diff --git a/with-go/go.mod b/with-go/go.mod index 37ede96..d3a7919 100644 --- a/with-go/go.mod +++ b/with-go/go.mod @@ -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 diff --git a/with-go/go.sum b/with-go/go.sum index 20d861f..8745370 100644 --- a/with-go/go.sum +++ b/with-go/go.sum @@ -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= diff --git a/with-go/main.go b/with-go/main.go index 1a053a7..3e5a38c 100644 --- a/with-go/main.go +++ b/with-go/main.go @@ -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 { diff --git a/with-k8s-tokenreview/app/Dockerfile b/with-k8s-tokenreview/app/Dockerfile index 208df6f..b6249ef 100644 --- a/with-k8s-tokenreview/app/Dockerfile +++ b/with-k8s-tokenreview/app/Dockerfile @@ -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 . . diff --git a/with-k8s-tokenreview/app/go.mod b/with-k8s-tokenreview/app/go.mod index f7f5377..3a656f8 100644 --- a/with-k8s-tokenreview/app/go.mod +++ b/with-k8s-tokenreview/app/go.mod @@ -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 @@ -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 diff --git a/with-k8s-tokenreview/app/go.sum b/with-k8s-tokenreview/app/go.sum index f984165..a8dc14e 100644 --- a/with-k8s-tokenreview/app/go.sum +++ b/with-k8s-tokenreview/app/go.sum @@ -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= diff --git a/with-k8s-tokenreview/app/main.go b/with-k8s-tokenreview/app/main.go index 6de8e91..b4a2b79 100644 --- a/with-k8s-tokenreview/app/main.go +++ b/with-k8s-tokenreview/app/main.go @@ -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" ) diff --git a/with-microservices-go/README.md b/with-microservices-go/README.md index bc8a44b..e809310 100644 --- a/with-microservices-go/README.md +++ b/with-microservices-go/README.md @@ -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. diff --git a/with-microservices-go/go.mod b/with-microservices-go/go.mod index d2fb3dc..6d1f48a 100644 --- a/with-microservices-go/go.mod +++ b/with-microservices-go/go.mod @@ -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 diff --git a/with-microservices-go/go.sum b/with-microservices-go/go.sum index 69bf807..a93294a 100644 --- a/with-microservices-go/go.sum +++ b/with-microservices-go/go.sum @@ -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= diff --git a/with-microservices-go/internal/authx/token_source.go b/with-microservices-go/internal/authx/token_source.go index 5ad140c..17240a6 100644 --- a/with-microservices-go/internal/authx/token_source.go +++ b/with-microservices-go/internal/authx/token_source.go @@ -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. diff --git a/with-nextjs-13/package-lock.json b/with-nextjs-13/package-lock.json index f719433..f960643 100644 --- a/with-nextjs-13/package-lock.json +++ b/with-nextjs-13/package-lock.json @@ -5,8 +5,8 @@ "packages": { "": { "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" @@ -22,9 +22,9 @@ } }, "node_modules/@authorizerdev/authorizer-js": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-js/-/authorizer-js-3.2.1.tgz", - "integrity": "sha512-Z7Vpdqs3JsosCcjV63rd7w7mj5n9Vh+RnGDR+qamTbbII+cbwttHpw1jP+61P2uNQLWC3jjp50HvL7xccWAnJQ==", + "version": "3.3.0-rc.4", + "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-js/-/authorizer-js-3.3.0-rc.4.tgz", + "integrity": "sha512-OtI9bZOn5bLFPfMwXj0Eh9VOO04VEmoK3pr8vTsmb5ieejITRvFjMOm/tmCLTzIEE0uk0tToMAD3tkUSqGGBwQ==", "license": "MIT", "dependencies": { "cross-fetch": "^4.1.0" @@ -37,12 +37,12 @@ } }, "node_modules/@authorizerdev/authorizer-react": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-react/-/authorizer-react-2.0.7.tgz", - "integrity": "sha512-+qBrbdE6VyljOge1Ad2AmVIpoheymlLsMxCZHW0hnCeKf0R0wJz3MvoKBiaHAcRF/Bf8Wc6+NBCctAnzXjiwMg==", + "version": "2.2.0-rc.3", + "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-react/-/authorizer-react-2.2.0-rc.3.tgz", + "integrity": "sha512-0WutAKhKYwlmeLJbgcfqEYm5e0mx9MREjUVAJQaZaJcN13Shp3jOn/yHQTayXJHaEsqnQyNHtz1noA1ondkjww==", "license": "MIT", "dependencies": { - "@authorizerdev/authorizer-js": "3.0.4", + "@authorizerdev/authorizer-js": "^3.3.0-rc.4", "@storybook/preset-scss": "^1.0.3", "validator": "^13.11.0" }, @@ -53,21 +53,6 @@ "react": ">=16" } }, - "node_modules/@authorizerdev/authorizer-react/node_modules/@authorizerdev/authorizer-js": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-js/-/authorizer-js-3.0.4.tgz", - "integrity": "sha512-vkXg1inxC6U2eLra/EQmhTVKzdlpCF4+a93tOfUgSyISYnE8v9np54OAOrs//4aTVOwFTIhahSTvpERKj2NZAQ==", - "license": "MIT", - "dependencies": { - "cross-fetch": "^4.1.0" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/authorizerdev" - } - }, "node_modules/@authorizerdev/authorizer-react/node_modules/@storybook/preset-scss": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@storybook/preset-scss/-/preset-scss-1.0.3.tgz", diff --git a/with-nextjs-13/package.json b/with-nextjs-13/package.json index f6e038c..35791e5 100644 --- a/with-nextjs-13/package.json +++ b/with-nextjs-13/package.json @@ -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" diff --git a/with-nextjs/package-lock.json b/with-nextjs/package-lock.json index 54adc11..7e65eff 100644 --- a/with-nextjs/package-lock.json +++ b/with-nextjs/package-lock.json @@ -5,8 +5,8 @@ "packages": { "": { "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": "^12.3.4", "react": "^18.2.0", "react-dom": "^18.2.0" @@ -31,9 +31,9 @@ } }, "node_modules/@authorizerdev/authorizer-js": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-js/-/authorizer-js-3.2.1.tgz", - "integrity": "sha512-Z7Vpdqs3JsosCcjV63rd7w7mj5n9Vh+RnGDR+qamTbbII+cbwttHpw1jP+61P2uNQLWC3jjp50HvL7xccWAnJQ==", + "version": "3.3.0-rc.4", + "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-js/-/authorizer-js-3.3.0-rc.4.tgz", + "integrity": "sha512-OtI9bZOn5bLFPfMwXj0Eh9VOO04VEmoK3pr8vTsmb5ieejITRvFjMOm/tmCLTzIEE0uk0tToMAD3tkUSqGGBwQ==", "license": "MIT", "dependencies": { "cross-fetch": "^4.1.0" @@ -46,12 +46,12 @@ } }, "node_modules/@authorizerdev/authorizer-react": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-react/-/authorizer-react-2.0.7.tgz", - "integrity": "sha512-+qBrbdE6VyljOge1Ad2AmVIpoheymlLsMxCZHW0hnCeKf0R0wJz3MvoKBiaHAcRF/Bf8Wc6+NBCctAnzXjiwMg==", + "version": "2.2.0-rc.3", + "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-react/-/authorizer-react-2.2.0-rc.3.tgz", + "integrity": "sha512-0WutAKhKYwlmeLJbgcfqEYm5e0mx9MREjUVAJQaZaJcN13Shp3jOn/yHQTayXJHaEsqnQyNHtz1noA1ondkjww==", "license": "MIT", "dependencies": { - "@authorizerdev/authorizer-js": "3.0.4", + "@authorizerdev/authorizer-js": "^3.3.0-rc.4", "@storybook/preset-scss": "^1.0.3", "validator": "^13.11.0" }, @@ -62,21 +62,6 @@ "react": ">=16" } }, - "node_modules/@authorizerdev/authorizer-react/node_modules/@authorizerdev/authorizer-js": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-js/-/authorizer-js-3.0.4.tgz", - "integrity": "sha512-vkXg1inxC6U2eLra/EQmhTVKzdlpCF4+a93tOfUgSyISYnE8v9np54OAOrs//4aTVOwFTIhahSTvpERKj2NZAQ==", - "license": "MIT", - "dependencies": { - "cross-fetch": "^4.1.0" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/authorizerdev" - } - }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", diff --git a/with-nextjs/package.json b/with-nextjs/package.json index dae2427..1faf5c3 100644 --- a/with-nextjs/package.json +++ b/with-nextjs/package.json @@ -6,8 +6,8 @@ "start": "next start" }, "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": "^12.3.4", "react": "^18.2.0", "react-dom": "^18.2.0" diff --git a/with-python/README.md b/with-python/README.md index 30dfc8e..f5f2b61 100644 --- a/with-python/README.md +++ b/with-python/README.md @@ -1,6 +1,6 @@ # Authorizer Example with Python -Signup, login and profile with the [Python SDK](https://github.com/authorizerdev/authorizer-python) (`authorizer-py` 0.2.0) sync client, plus the admin client listing users. +Signup, login and profile with the [Python SDK](https://github.com/authorizerdev/authorizer-python) (`authorizer-py` 0.3.0rc3) sync client, plus the admin client listing users. ## Run an Authorizer instance diff --git a/with-python/requirements.txt b/with-python/requirements.txt index 5f54ac3..1bab070 100644 --- a/with-python/requirements.txt +++ b/with-python/requirements.txt @@ -1 +1 @@ -authorizer-py==0.2.0 +authorizer-py==0.3.0rc3 diff --git a/with-rag-fga/requirements.txt b/with-rag-fga/requirements.txt index 81f7eb4..2a86d9e 100644 --- a/with-rag-fga/requirements.txt +++ b/with-rag-fga/requirements.txt @@ -1,4 +1,4 @@ # Official Authorizer Python SDK: https://pypi.org/project/authorizer-py/ -authorizer-py>=0.2.0 +authorizer-py>=0.3.0rc3 # Small, pure-Python BM25 ranking (the only retrieval dependency) rank-bm25>=0.2.2 diff --git a/with-rag-fga/seed.py b/with-rag-fga/seed.py index 03740e5..b7e8ae8 100644 --- a/with-rag-fga/seed.py +++ b/with-rag-fga/seed.py @@ -35,8 +35,8 @@ FgaTupleInput, FgaWriteModelRequest, FgaWriteTuplesRequest, + ListUsersRequest, LoginRequest, - PaginatedRequest, PaginationRequest, SignUpRequest, ) @@ -110,7 +110,7 @@ def ensure_user( client.login(LoginRequest(email=email, password=DEMO_PASSWORD)) except AuthorizerError: raise SystemExit(f"signup failed for {email}: {signup_error}") from None - users = admin.users(PaginatedRequest(pagination=PaginationRequest(limit=100))) + users = admin.users(ListUsersRequest(pagination=PaginationRequest(limit=100))) for user in users.users: if user.email == email: print(f" user {email} already exists") diff --git a/with-react-native-expo/package-lock.json b/with-react-native-expo/package-lock.json index 44f6249..67b9436 100644 --- a/with-react-native-expo/package-lock.json +++ b/with-react-native-expo/package-lock.json @@ -8,7 +8,7 @@ "name": "with-react-native-expo", "version": "1.0.0", "dependencies": { - "@authorizerdev/authorizer-js": "^3.2.1", + "@authorizerdev/authorizer-js": "^3.3.0-rc.4", "expo": "~49.0.15", "expo-auth-session": "~5.0.2", "expo-crypto": "~12.4.1", @@ -36,9 +36,9 @@ } }, "node_modules/@authorizerdev/authorizer-js": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-js/-/authorizer-js-3.2.1.tgz", - "integrity": "sha512-Z7Vpdqs3JsosCcjV63rd7w7mj5n9Vh+RnGDR+qamTbbII+cbwttHpw1jP+61P2uNQLWC3jjp50HvL7xccWAnJQ==", + "version": "3.3.0-rc.4", + "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-js/-/authorizer-js-3.3.0-rc.4.tgz", + "integrity": "sha512-OtI9bZOn5bLFPfMwXj0Eh9VOO04VEmoK3pr8vTsmb5ieejITRvFjMOm/tmCLTzIEE0uk0tToMAD3tkUSqGGBwQ==", "license": "MIT", "dependencies": { "cross-fetch": "^4.1.0" diff --git a/with-react-native-expo/package.json b/with-react-native-expo/package.json index 6dec378..283f7e1 100644 --- a/with-react-native-expo/package.json +++ b/with-react-native-expo/package.json @@ -9,7 +9,7 @@ "web": "expo start --web" }, "dependencies": { - "@authorizerdev/authorizer-js": "^3.2.1", + "@authorizerdev/authorizer-js": "^3.3.0-rc.4", "expo": "~49.0.15", "expo-auth-session": "~5.0.2", "expo-crypto": "~12.4.1", diff --git a/with-react/package-lock.json b/with-react/package-lock.json index c13e151..412bab9 100644 --- a/with-react/package-lock.json +++ b/with-react/package-lock.json @@ -8,7 +8,7 @@ "name": "authorizer-demo", "version": "1.0.0", "dependencies": { - "@authorizerdev/authorizer-react": "^2.0.7", + "@authorizerdev/authorizer-react": "^2.2.0-rc.3", "history": "5.1.0", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -33,9 +33,9 @@ } }, "node_modules/@authorizerdev/authorizer-js": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-js/-/authorizer-js-3.0.4.tgz", - "integrity": "sha512-vkXg1inxC6U2eLra/EQmhTVKzdlpCF4+a93tOfUgSyISYnE8v9np54OAOrs//4aTVOwFTIhahSTvpERKj2NZAQ==", + "version": "3.3.0-rc.4", + "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-js/-/authorizer-js-3.3.0-rc.4.tgz", + "integrity": "sha512-OtI9bZOn5bLFPfMwXj0Eh9VOO04VEmoK3pr8vTsmb5ieejITRvFjMOm/tmCLTzIEE0uk0tToMAD3tkUSqGGBwQ==", "license": "MIT", "dependencies": { "cross-fetch": "^4.1.0" @@ -48,12 +48,12 @@ } }, "node_modules/@authorizerdev/authorizer-react": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-react/-/authorizer-react-2.0.7.tgz", - "integrity": "sha512-+qBrbdE6VyljOge1Ad2AmVIpoheymlLsMxCZHW0hnCeKf0R0wJz3MvoKBiaHAcRF/Bf8Wc6+NBCctAnzXjiwMg==", + "version": "2.2.0-rc.3", + "resolved": "https://registry.npmjs.org/@authorizerdev/authorizer-react/-/authorizer-react-2.2.0-rc.3.tgz", + "integrity": "sha512-0WutAKhKYwlmeLJbgcfqEYm5e0mx9MREjUVAJQaZaJcN13Shp3jOn/yHQTayXJHaEsqnQyNHtz1noA1ondkjww==", "license": "MIT", "dependencies": { - "@authorizerdev/authorizer-js": "3.0.4", + "@authorizerdev/authorizer-js": "^3.3.0-rc.4", "@storybook/preset-scss": "^1.0.3", "validator": "^13.11.0" }, diff --git a/with-react/package.json b/with-react/package.json index 6ff7cf5..c925e1c 100644 --- a/with-react/package.json +++ b/with-react/package.json @@ -5,7 +5,7 @@ "keywords": [], "main": "src/index.js", "dependencies": { - "@authorizerdev/authorizer-react": "^2.0.7", + "@authorizerdev/authorizer-react": "^2.2.0-rc.3", "history": "5.1.0", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/with-spiffe/workload/Dockerfile b/with-spiffe/workload/Dockerfile index 93e7f88..073dc42 100644 --- a/with-spiffe/workload/Dockerfile +++ b/with-spiffe/workload/Dockerfile @@ -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 . . diff --git a/with-spiffe/workload/go.mod b/with-spiffe/workload/go.mod index 876d6e1..2fdc784 100644 --- a/with-spiffe/workload/go.mod +++ b/with-spiffe/workload/go.mod @@ -3,13 +3,14 @@ module github.com/authorizerdev/examples/with-spiffe/workload 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/spiffe/go-spiffe/v2 v2.6.0 ) require ( buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260415201107-50325440f8f2.1 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/authorizerdev/authorizer-proto-go v0.1.0 // indirect github.com/go-jose/go-jose/v4 v4.1.4 // indirect golang.org/x/net v0.51.0 // indirect golang.org/x/sys v0.42.0 // indirect @@ -19,9 +20,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 diff --git a/with-spiffe/workload/go.sum b/with-spiffe/workload/go.sum index 5426eda..8816fd8 100644 --- a/with-spiffe/workload/go.sum +++ b/with-spiffe/workload/go.sum @@ -2,6 +2,10 @@ buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-202604152011 buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260415201107-50325440f8f2.1/go.mod h1:tvtbpgaVXZX4g6Pn+AnzFycuRK3MOz5HJfEGeEllXYM= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +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/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= diff --git a/with-spiffe/workload/main.go b/with-spiffe/workload/main.go index 7c042c2..ba0fa72 100644 --- a/with-spiffe/workload/main.go +++ b/with-spiffe/workload/main.go @@ -16,7 +16,7 @@ import ( "os" "time" - authorizer "github.com/authorizerdev/authorizer-go" + authorizer "github.com/authorizerdev/authorizer-go/v2" "github.com/spiffe/go-spiffe/v2/svid/jwtsvid" "github.com/spiffe/go-spiffe/v2/workloadapi" ) diff --git a/with-vanilla-js-custom-ui/index.html b/with-vanilla-js-custom-ui/index.html index 74a398c..88ec858 100644 --- a/with-vanilla-js-custom-ui/index.html +++ b/with-vanilla-js-custom-ui/index.html @@ -39,7 +39,7 @@

Foo Bar!

mollit anim id est laborum.

- + + +