add base auth to hydra admin api
This commit is contained in:
parent
4be94173d4
commit
78c51b7206
|
@ -20,6 +20,8 @@ DOMAIN = 'example.com'
|
|||
|
||||
HYDRA_REQUEST_TIMEOUT_SECONDS = 3
|
||||
HYDRA_ADMIN_URL = 'http://127.0.0.1:4445'
|
||||
HYDRA_ADMIN_USER = 'lenticluar_cloud'
|
||||
HYDRA_ADMIN_PASSWORD = 'notSecure'
|
||||
HYDRA_PUBLIC_URL = 'http://127.0.0.1:4444'
|
||||
SUBJECT_PREFIX = 'something random'
|
||||
|
||||
|
|
|
@ -50,7 +50,10 @@ def init_app(name=None):
|
|||
app.login_manager = LoginManager(app)
|
||||
|
||||
#init hydra admin api
|
||||
hydra_config = hydra.Configuration(app.config['HYDRA_ADMIN_URL'])
|
||||
hydra_config = hydra.Configuration(
|
||||
app.config['HYDRA_ADMIN_URL'],
|
||||
username=app.config['HYDRA_ADMIN_USER'],
|
||||
password=app.config['HYDRA_ADMIN_PASSWORD'])
|
||||
hydra_client = hydra.ApiClient(hydra_config)
|
||||
app.hydra_api = hydra.AdminApi(hydra_client)
|
||||
|
||||
|
|
Loading…
Reference in a new issue