Browse Source

Updated docs.

hotfix/merge
Marcos Pereira 7 years ago
parent
commit
451f0d8c40
  1. 5
      README.md
  2. 5
      docs/source/index.rst

5
README.md

@ -83,4 +83,9 @@ KEYCLOAK_PUBLIC_KEY = "secret"
options = {"verify_signature": True, "verify_aud": True, "exp": True}
token_info = keycloak.decode_token(token['access_token'], key=KEYCLOAK_PUBLIC_KEY, options=options)
# Get permissions by token
token = keycloak.token("user", "password")
keycloak.load_authorization_config("example-authz-config.json")
permissions = keycloak.get_permissions(token['access_token'])
```

5
docs/source/index.rst

@ -113,3 +113,8 @@ Main methods::
options = {"verify_signature": True, "verify_aud": True, "exp": True}
token_info = keycloak.decode_token(token['access_token'], key=KEYCLOAK_PUBLIC_KEY, options=options)
# Get permissions by token
token = keycloak.token("user", "password")
keycloak.load_authorization_config("example-authz-config.json")
permissions = keycloak.get_permissions(token['access_token'])
Loading…
Cancel
Save