Skip to content

Commit

Permalink
Add authn_method to Consumer.complete()
Browse files Browse the repository at this point in the history
  • Loading branch information
stinovlas committed Mar 24, 2023
1 parent a8454e3 commit 1d46f09
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ The format is based on the [KeepAChangeLog] project.
## Unreleased
### Changed
- [#847] Using pydantic for settings instead of custom class
- [#851], [#852] Add `authn_method` to `Consumer.complete`

[#847]: https://github.com/CZ-NIC/pyoidc/pull/847
[#851]: https://github.com/CZ-NIC/pyoidc/issues/851
[#852]: https://github.com/CZ-NIC/pyoidc/pull/852

## 1.5.0 [2022-12-14]

Expand Down
7 changes: 5 additions & 2 deletions src/oic/oic/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def parse_authz(
self.verify_id_token(idt, self.authz_req.get(_state or atr["state"]))
return aresp, atr, idt

def complete(self, state):
def complete(self, state, authn_method: str = "client_secret_basic"):
"""
Do the access token request, the last step in a code flow.
Expand All @@ -485,7 +485,10 @@ def complete(self, state):
raise PyoidcError("Nothing to authenticate with")

resp = self.do_access_token_request(
state=state, request_args=args, http_args=http_args
state=state,
request_args=args,
http_args=http_args,
authn_method=authn_method,
)

logger.info("Access Token Response: %s" % sanitize(resp))
Expand Down

0 comments on commit 1d46f09

Please sign in to comment.