Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ciur committed May 1, 2024
1 parent 6110c67 commit 6b7ceaa
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion oidc_app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class Settings(BaseSettings):
papermerge__auth__oidc_authorize_url: str
# OIDC provider "token" endpoint
# for Keycloak it is <domain>/realms/<realm>/protocol/openid-connect/token
papermerge__auth__access_token_url: str
algorithms: list[Algs] = ['RS256']
# `public_key` actually can be extracted from OIDC provider
# TODO: extract public keu from OIDC provider
Expand Down
2 changes: 1 addition & 1 deletion oidc_app/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async def get_token(code: str) -> tuple[
logger.debug(f"params: {params}")

response = await client.post(
settings.papermerge__auth__access_token_url,
settings.papermerge__auth__oidc_access_token_url,
data=params,
headers={
'Content-Type': 'application/x-www-form-urlencoded'
Expand Down
2 changes: 1 addition & 1 deletion oidc_app/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def authorize_url() -> str:
- https://curity.io/resources/learn/oauth-code-flow/#request-parameters
"""
params = urllib.parse.urlencode({
'client_id': settings.client_id,
'client_id': settings.papermerge__auth__oidc_client_id,
'response_type': 'code',
})
url = f"{settings.papermerge__auth__oidc_authorize_url}?{params}"
Expand Down

0 comments on commit 6b7ceaa

Please sign in to comment.