Browse Source

add an example on how to get a token with user+password+totp

pull/12/head
Alain ROMEYER 6 years ago
parent
commit
5f981d4de8
  1. 1
      README.md
  2. 1
      docs/source/index.rst

1
README.md

@ -69,6 +69,7 @@ config_well_know = keycloak_openid.well_know()
# Get Token # Get Token
token = keycloak_openid.token("user", "password") token = keycloak_openid.token("user", "password")
token = keycloak_openid.token("user", "password", totp="012345")
# Get Userinfo # Get Userinfo
userinfo = keycloak_openid.userinfo(token['access_token']) userinfo = keycloak_openid.userinfo(token['access_token'])

1
docs/source/index.rst

@ -97,6 +97,7 @@ Main methods::
# Get Token # Get Token
token = keycloak_openid.token("user", "password") token = keycloak_openid.token("user", "password")
token = keycloak_openid.token("user", "password", totp="012345")
# Get Userinfo # Get Userinfo
userinfo = keycloak_openid.userinfo(token['access_token']) userinfo = keycloak_openid.userinfo(token['access_token'])

Loading…
Cancel
Save