Tweak settings for new branch

This commit is contained in:
Neil Martinsen-Burrell 2022-09-26 14:28:36 -05:00
parent f147f8c2ab
commit 0edd42dac7
No known key found for this signature in database
GPG key ID: 6A3C818CC10D0184
5 changed files with 6 additions and 6 deletions

View file

@ -22,7 +22,7 @@ services:
# Run Django in debug mode on local # Run Django in debug mode on local
- DJANGO_DEBUG=True - DJANGO_DEBUG=True
# Tell Django where it is being hosted # Tell Django where it is being hosted
- DJANGO_BASE_URL="localhost:8080" - DJANGO_BASE_URL=http://localhost:8080
# --- These keys are obtained from `.env` file --- # --- These keys are obtained from `.env` file ---
# Set a private JWT signing key for Login.gov # Set a private JWT signing key for Login.gov
- DJANGO_SECRET_LOGIN_KEY - DJANGO_SECRET_LOGIN_KEY

View file

@ -403,9 +403,9 @@ OIDC_PROVIDERS = {
}, },
"client_registration": { "client_registration": {
"client_id": "cisa_dotgov_registrar", "client_id": "cisa_dotgov_registrar",
"redirect_uris": [f"https://{env_base_url}/openid/callback/login/"], "redirect_uris": [f"{env_base_url}/openid/callback/login/"],
"post_logout_redirect_uris": [ "post_logout_redirect_uris": [
f"https://{env_base_url}/openid/callback/logout/" f"{env_base_url}/openid/callback/logout/"
], ],
"token_endpoint_auth_method": ["private_key_jwt"], "token_endpoint_auth_method": ["private_key_jwt"],
"sp_private_key": secret_login_key, "sp_private_key": secret_login_key,

View file

@ -11,6 +11,7 @@ from registrar.views import health, index, whoami
urlpatterns = [ urlpatterns = [
path("", index.index, name="home"), path("", index.index, name="home"),
path("whoami", whoami.whoami, name="whoami"),
path("admin/", admin.site.urls), path("admin/", admin.site.urls),
path("health/", health.health), path("health/", health.health),
path("openid/", include("djangooidc.urls")), path("openid/", include("djangooidc.urls")),

View file

@ -132,7 +132,7 @@
{% if user.is_authenticated %} {% if user.is_authenticated %}
User: <a href="/whoami">{{ user.get_username }}</a> User: <a href="/whoami">{{ user.get_username }}</a>
{% else %} {% else %}
<a href="/openid/openid/login">Sign in</a> <a href="/openid/login">Sign in</a>
{% endif %} {% endif %}
</li> </li>
</ul> </ul>

View file

@ -17,7 +17,6 @@
<p>This is the .gov registrar.</p> <p>This is the .gov registrar.</p>
{% if user.is_authenticated %} {% if user.is_authenticated %}
<p><b>Hello {{ user.id }}</b></p>
<p><a href="/openid/logout/">Click here to log out.</a></p> <p><a href="/openid/logout/">Click here to log out.</a></p>
{% else %} {% else %}
<p><a href="/openid/login/">Click here to log in.</a></p> <p><a href="/openid/login/">Click here to log in.</a></p>