From 5f981d4de87a12fbce18f38413058061b1ba60d8 Mon Sep 17 00:00:00 2001 From: Alain ROMEYER Date: Wed, 5 Dec 2018 09:56:10 +0100 Subject: [PATCH] add an example on how to get a token with user+password+totp --- README.md | 1 + docs/source/index.rst | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 990ef71..b79147d 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ config_well_know = keycloak_openid.well_know() # Get Token token = keycloak_openid.token("user", "password") +token = keycloak_openid.token("user", "password", totp="012345") # Get Userinfo userinfo = keycloak_openid.userinfo(token['access_token']) diff --git a/docs/source/index.rst b/docs/source/index.rst index e105a03..1123ddd 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -97,6 +97,7 @@ Main methods:: # Get Token token = keycloak_openid.token("user", "password") + token = keycloak_openid.token("user", "password", totp="012345") # Get Userinfo userinfo = keycloak_openid.userinfo(token['access_token'])