refactor nixos dev setup

This commit is contained in:
tuxcoder 2023-12-17 14:47:38 +01:00
parent 0494fb336f
commit fbbe6e2c87
5 changed files with 121 additions and 31 deletions

View file

@ -12,13 +12,14 @@ SQLALCHEMY_TRACK_MODIFICATIONS = false
PKI_PATH = "../data/pki"
DOMAIN = 'example.com'
PUBLIC_URL = 'http://localhost:5000'
#SERVER_NAME = f'account.{ DOMAIN }:9090'
HYDRA_REQUEST_TIMEOUT_SECONDS = 3
HYDRA_ADMIN_URL = 'http://127.0.0.1:4445'
HYDRA_ADMIN_URL = 'http://127.0.0.1:8081'
HYDRA_ADMIN_USER = 'lenticluar_cloud'
HYDRA_ADMIN_PASSWORD = 'notSecure'
HYDRA_PUBLIC_URL = 'http://127.0.0.1:4444'
HYDRA_PUBLIC_URL = 'http://127.0.0.1:8082'
SUBJECT_PREFIX = 'something random'
OAUTH_ID = 'identiy_provider'

View file

@ -35,7 +35,7 @@ class HydraService:
break
if client is None:
domain = app.config['DOMAIN']
public_url = app.config['PUBLIC_URL']
client = OAuth20Client(
client_name="identiy_provider",
# client_id=client_id,
@ -43,7 +43,7 @@ class HydraService:
response_types=["code", "id_token"],
scope="openid profile manage",
grant_types=["authorization_code", "refresh_token"],
redirect_uris=[ f"https://{domain}/oauth/authorized" ],
redirect_uris=[ f"{public_url}/oauth/authorized" ],
token_endpoint_auth_method="client_secret_basic",
)
ret = create_o_auth_2_client.sync(json_body=client, _client=self.hydra_client)