diff --git a/docker-compose.yml b/docker-compose.yml index bf5eafdd4b7e8f614bbebf30ece9f1956146dbe7..1f626f2c8510fb0fbdbc857bc37ed564015aaa18 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,7 @@ services: - "4445:4445" # Admin port - "5555:5555" # Port for hydra token user command: - serve all --dangerous-force-http --dangerous-allow-insecure-redirect-urls "http://localhost:13337/callback" + serve all --dangerous-force-http --dangerous-allow-insecure-redirect-urls "http://127.0.0.1:13337/callback" environment: - URLS_SELF_ISSUER=http://localhost:4444/ - URLS_CONSENT=http://localhost:5001/consent @@ -32,6 +32,7 @@ services: environment: - HYDRA_ADMIN_URL=http://hydra:4445 - GRAPHQL_URL=http://backend:5000/graphql + - FLASK_ENV=development ports: - "5001:5001" restart: unless-stopped @@ -40,6 +41,7 @@ services: environment: - HYDRA_ADMIN_URL=http://hydra:4445 - GRAPHQL_URL=http://backend:5000/graphql + - FLASK_ENV=development ports: - "5000:5000" restart: unless-stopped @@ -59,3 +61,23 @@ services: image: postgres:11 environment: - POSTGRES_PASSWORD=secret + oauth: + build: ./test/login_logout + environment: + - BASE_URL=http://localhost:4444/ + - ACCESS_TOKEN_URL=http://hydra:4444/oauth2/token + - LOGOUT_URL=http://localhost:4444/oauth2/sessions/logout + - AUTHORIZE_URL=http://localhost:4444/oauth2/auth + - USERINFO_URL=http://hydra:4444/userinfo + - KEY=testapp + - SECRET=secret + - OAUTHLIB_INSECURE_TRANSPORT=true + - FLASK_ENV=development + # with this settings run: + # `bash test/create-127.0.0.1-client.bash testapp clientsecret http://localhost:4445 http://127.0.0.1:13337/callback + # to register a corresponding oauth client with hydra + ports: + - "13337:13337" + command: flask run --port 13337 --host "0.0.0.0" + restart: unless-stopped + diff --git a/test/login_logout/README.md b/test/login_logout/README.md index 019bcffb9757910dfa23f18b9730cbd3f367611f..282f4e180172a6e8923fa20f25c7e62c45fc36f5 100644 --- a/test/login_logout/README.md +++ b/test/login_logout/README.md @@ -53,6 +53,7 @@ export AUTHORIZE_URL=http://localhost:4444/oauth2/auth # Hydra authentic export USERINFO_URL=http://localhost:4444/userinfo # Hydra OpenID Connect userinfo endpoint export KEY=testapplication # name of your oauth/openID Connect client (application) export SECRET=clientsecret # secret of your oauth/openID Connect client (application) +export OAUTHLIB_INSECURE_TRANSPORT=true # allows connections via http ```