GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — examples/with-python at main · authorizerdev/examples

Expand file tree

/

with-python

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

with-python

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
README.md
README.md
 
 
main.py
main.py
 
 
requirements.txt
requirements.txt
 
 

README.md

Outline

Authorizer Example with Python

Signup, login and profile with the Python SDK (authorizer-py 0.3.0rc4) sync client, plus the admin client listing users.

Run an Authorizer instance

git clone https://github.com/authorizerdev/authorizer.git
cd authorizer
make dev   # http://localhost:8080, admin secret: admin

Run the example

python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python main.py

Defaults match make dev; override with AUTHORIZER_URL, CLIENT_ID, ADMIN_SECRET env vars.

Notes

  • The pip package is authorizer-py; the import is authorizer.
  • The client supports three wire protocols: graphql (default), rest, and grpc (AuthorizerClient(..., protocol="grpc"); gRPC needs pip install 'authorizer-py[grpc]').
  • Async variants exist for both clients: AsyncAuthorizerClient, AsyncAuthorizerAdminClient.
  • Admin operations authenticate with the x-authorizer-admin-secret header, normally via AuthorizerAdminClient.

Note on the MFA offer

Since server 2.4.0 MFA is on by default, so signup/login withhold the access token and return Proceed to mfa setup; declining the offer with skip_mfa_setup is what releases it. That call is identified by the MFA session cookie, which the server marks Secure (--app-cookie-secure defaults to true) — httpx keeps it in its jar but will not replay it over plain http, so main.py reads it out of the jar and passes it by hand. A deployment on https needs none of that.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.