diff --git a/CHANGELOG.md b/CHANGELOG.md index 86e9079a..e160af34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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] diff --git a/src/oic/oic/consumer.py b/src/oic/oic/consumer.py index f246820a..b7cc7498 100644 --- a/src/oic/oic/consumer.py +++ b/src/oic/oic/consumer.py @@ -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. @@ -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))