Signup, login and profile with the Go SDK (release v2.2.0-rc.5) over the GraphQL protocol, plus the admin client listing users.
git clone https://github.com/authorizerdev/authorizer.git
cd authorizer
make dev # http://localhost:8080, admin secret: admingo run .Defaults match make dev; override with AUTHORIZER_URL, CLIENT_ID, ADMIN_SECRET env vars.
- The SDK is v2+, so the module path carries the
/v2suffix: importgithub.com/authorizerdev/authorizer-go/v2and requiregithub.com/authorizerdev/authorizer-go/v2 v2.2.0-rc.5ingo.mod. - The client supports three wire protocols:
graphql(default, used here),rest, andgrpc(authorizer.WithProtocol). - Admin operations (
admin.Users, etc.) authenticate with thex-authorizer-admin-secretheader, handled byNewAuthorizerAdminClient. GetTokenis functional inv2.2.0-rc.5(includingclient_credentials); you can also get tokens viaLogin, or callPOST /oauth/tokendirectly for machine flows (see thewith-m2m-client-credentialsexample).