|
@ -75,8 +75,8 @@ rpt = keycloak.entitlement(token['access_token'], "resource_id") |
|
|
token_rpt_info = keycloak.instropect(keycloak.instropect(token['access_token'], rpt=rpt['rpt'], |
|
|
token_rpt_info = keycloak.instropect(keycloak.instropect(token['access_token'], rpt=rpt['rpt'], |
|
|
token_type_hint="requesting_party_token")) |
|
|
token_type_hint="requesting_party_token")) |
|
|
|
|
|
|
|
|
# Instropect Token |
|
|
|
|
|
token_info = keycloak.instropect(token['access_token'])) |
|
|
|
|
|
|
|
|
# Introspect Token |
|
|
|
|
|
token_info = keycloak.introspect(token['access_token'])) |
|
|
|
|
|
|
|
|
# Decode Token |
|
|
# Decode Token |
|
|
KEYCLOAK_PUBLIC_KEY = "secret" |
|
|
KEYCLOAK_PUBLIC_KEY = "secret" |
|
@ -87,6 +87,6 @@ token_info = keycloak.decode_token(token['access_token'], key=KEYCLOAK_PUBLIC_KE |
|
|
token = keycloak.token("user", "password") |
|
|
token = keycloak.token("user", "password") |
|
|
keycloak.load_authorization_config("example-authz-config.json") |
|
|
keycloak.load_authorization_config("example-authz-config.json") |
|
|
policies = keycloak.get_policies(token['access_token'], method_token_info='decode', key=KEYCLOAK_PUBLIC_KEY) |
|
|
policies = keycloak.get_policies(token['access_token'], method_token_info='decode', key=KEYCLOAK_PUBLIC_KEY) |
|
|
permissions = keycloak.get_permissions(token['access_token'], method_token_info='instrospect') |
|
|
|
|
|
|
|
|
permissions = keycloak.get_permissions(token['access_token'], method_token_info='introspect') |
|
|
|
|
|
|
|
|
``` |
|
|
``` |