Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ [#80] Support configuring basic auth for token endpoint #82

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mozilla_django_oidc_db/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class OpenIDConnectConfigAdmin(SingletonModelAdmin):
"oidc_op_jwks_endpoint",
"oidc_op_authorization_endpoint",
"oidc_op_token_endpoint",
"oidc_token_use_basic_auth",
"oidc_op_user_endpoint",
)
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 3.2.23 on 2024-02-05 16:51

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("mozilla_django_oidc_db", "0014_alter_openidconnectconfig_groups_claim"),
]

operations = [
migrations.AddField(
model_name="openidconnectconfig",
name="oidc_token_use_basic_auth",
field=models.BooleanField(
default=False,
help_text="If enabled, the client ID and secret are sent in the HTTP Basic auth header when obtaining the access token. Otherwise, they are sent in the request body.",
verbose_name="Use Basic auth for token endpoint",
),
),
]
9 changes: 9 additions & 0 deletions mozilla_django_oidc_db/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,15 @@ class OpenIDConnectConfigBase(SingletonModel):
max_length=1000,
help_text=_("URL of your OpenID Connect provider token endpoint"),
)
oidc_token_use_basic_auth = models.BooleanField(
_("Use Basic auth for token endpoint"),
default=False,
help_text=_(
"If enabled, the client ID and secret are sent in the HTTP Basic auth "
"header when obtaining the access token. Otherwise, they are sent in the "
"request body.",
),
)
oidc_op_user_endpoint = models.URLField(
_("User endpoint"),
max_length=1000,
Expand Down
Loading
Loading