From d8bd5076ed5a907da5f6bedd8da5bc65c410e065 Mon Sep 17 00:00:00 2001 From: Remco Kranenburg Date: Wed, 27 Jun 2018 14:07:31 +0200 Subject: [PATCH 1/3] Add possibility to use authorization_code in KeycloakOpenID.token --- keycloak/keycloak_openid.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/keycloak/keycloak_openid.py b/keycloak/keycloak_openid.py index f1dcde4..c579052 100644 --- a/keycloak/keycloak_openid.py +++ b/keycloak/keycloak_openid.py @@ -150,7 +150,7 @@ class KeycloakOpenID: """ return NotImplemented - def token(self, username, password, grant_type=["password"]): + def token(self, username="", password="", grant_type=["password"], code="", redirect_uri=""): """ The token endpoint is used to obtain tokens. Tokens can either be obtained by exchanging an authorization code or by supplying credentials directly depending on @@ -162,11 +162,14 @@ class KeycloakOpenID: :param username: :param password: :param grant_type: + :param code: + :param redirect_uri :return: """ params_path = {"realm-name": self.realm_name} payload = {"username": username, "password": password, - "client_id": self.client_id, "grant_type": grant_type} + "client_id": self.client_id, "grant_type": grant_type, + "code": code, "redirect_uri": redirect_uri} payload = self._add_secret_key(payload) data_raw = self.connection.raw_post(URL_TOKEN.format(**params_path), From 3e42088a399880e90dd00f82608a8d1008fabda6 Mon Sep 17 00:00:00 2001 From: Josha Inglis Date: Tue, 24 Jul 2018 14:13:15 +1000 Subject: [PATCH 2/3] loosen requirements --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index d6eafdf..70d3ca7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -requests==2.18.4 -httmock==1.2.5 -python-jose==1.4.0 +requests>=2.18.4 +httmock>=1.2.5 +python-jose>=1.4.0 From 3e80957154219b6ac3aa5acdce2ad0d443d75dc6 Mon Sep 17 00:00:00 2001 From: Marcos Pereira Date: Sun, 5 Aug 2018 13:21:29 -0300 Subject: [PATCH 3/3] Added new contributors --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index ec9b7cd..ecb1f91 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,9 @@ The documentation for python-keycloak is available on [readthedocs](http://pytho * [Marcos Pereira](marcospereira.mpj@gmail.com) * [Martin Devlin](martin.devlin@pearson.com) * [Shon T. Urbas](shon.urbas@gmail.com>) +* [Markus Spanier]() +* [Remco Kranenburg]() +* [Remco Kranenburg]() ## Usage