rename organize to org; work in progress: user management with access to auth provider

This commit is contained in:
Helmut Merz 2025-07-21 11:07:51 +02:00
parent 722b258103
commit 1b58c7fb22
10 changed files with 40 additions and 3 deletions

1
.gitignore vendored
View file

@ -9,6 +9,7 @@
*.sublime-workspace *.sublime-workspace
*.ropeproject *.ropeproject
.env .env
.private*
.pytest.ini .pytest.ini
*#*# *#*#
*.#* *.#*

View file

@ -42,3 +42,7 @@ oidc_params = dict(
cookie_crypt=getenv('OIDC_COOKIE_CRYPT', None) cookie_crypt=getenv('OIDC_COOKIE_CRYPT', None)
) )
# access zitadel API
zitadel_params = dict(
private_key_file=('ZITADEL_SERVICE_USER_PRIVATE_KEY_FILE', '.private-key.json')
)

15
demo/env.in Normal file
View file

@ -0,0 +1,15 @@
# s10: py-scopes/demo/.env
# input (example) file - copy to .env and edit.
SERVER_PORT=8800
BASE_URL=https://demo.cy7.de
DBNAME=demo
DBUSER=demo
DBPASSWORD=secret
DBSCHEMA=demo
OIDC_PROVIDER=
OIDC_CLIENT_ID=
OIDC_COOKIE_CRYPT=

1
scopes/org/__init__.py Normal file
View file

@ -0,0 +1 @@
"""package scopes.org"""

View file

@ -1,4 +1,4 @@
# scopes.organize.mail # scopes.org.mail
from zope.interface import implementer from zope.interface import implementer
from zope.sendmail.interfaces import IMailDelivery from zope.sendmail.interfaces import IMailDelivery

View file

@ -1,4 +1,4 @@
# scopes.organize.task # scopes.org.task
"""Task (and corresponding container) implementation.""" """Task (and corresponding container) implementation."""

8
scopes/org/user.py Normal file
View file

@ -0,0 +1,8 @@
# scopes.org.user
"""Basic user (principal) definitions + access to auth service (zitadel)."""
from scopes.web import client
from scopes import util
import config

View file

@ -1 +0,0 @@
"""package scopes.organize"""

View file

@ -55,3 +55,7 @@ oidc_params = dict(
cookie_crypt=getenv('OIDC_COOKIE_CRYPT', None) cookie_crypt=getenv('OIDC_COOKIE_CRYPT', None)
) )
# access zitadel API
zitadel_params = dict(
private_key_file=('ZITADEL_SERVICE_USER_PRIVATE_KEY_FILE', '.private-key.json')
)

5
scopes/web/client.py Normal file
View file

@ -0,0 +1,5 @@
# scopes.web.client
"""Web client functionality: access to web sites, APIs - including authentication."""
import requests