Skip to content

Commit 06415a1

Browse files
author
Marcos Pereira
committed
Merge branch 'hotfix/0.8.1'
2 parents 47719a6 + 215c7d7 commit 06415a1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

keycloak/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ def _token_info(self, token, method_token_info, **kwargs):
113113
:param kwargs:
114114
:return:
115115
"""
116-
if method_token_info == 'instropect':
117-
token_info = self.instropect(token)
116+
if method_token_info == 'introspect':
117+
token_info = self.introspect(token)
118118
else:
119119
token_info = self.decode_token(token, **kwargs)
120120

@@ -228,7 +228,7 @@ def entitlement(self, token, resource_server_id):
228228

229229
return raise_error_from_response(data_raw, KeycloakGetError)
230230

231-
def instropect(self, token, rpt=None, token_type_hint=None):
231+
def introspect(self, token, rpt=None, token_type_hint=None):
232232
"""
233233
The introspection endpoint is used to retrieve the active state of a token. It is can only be
234234
invoked by confidential clients.
@@ -291,7 +291,7 @@ def load_authorization_config(self, path):
291291
self.authorization.load_config(authorization_json)
292292
authorization_file.close()
293293

294-
def get_policies(self, token, method_token_info='instropect', **kwargs):
294+
def get_policies(self, token, method_token_info='introspect', **kwargs):
295295
"""
296296
Get policies by user token
297297
@@ -306,7 +306,7 @@ def get_policies(self, token, method_token_info='instropect', **kwargs):
306306

307307
token_info = self._token_info(token, method_token_info, **kwargs)
308308

309-
if method_token_info == 'instropect' and not token_info['active']:
309+
if method_token_info == 'introspect' and not token_info['active']:
310310
raise KeycloakInvalidTokenError(
311311
"Token expired or invalid."
312312
)
@@ -325,7 +325,7 @@ def get_policies(self, token, method_token_info='instropect', **kwargs):
325325

326326
return list(set(policies))
327327

328-
def get_permissions(self, token, method_token_info='instropect', **kwargs):
328+
def get_permissions(self, token, method_token_info='introspect', **kwargs):
329329
"""
330330
Get permission by user token
331331
@@ -342,7 +342,7 @@ def get_permissions(self, token, method_token_info='instropect', **kwargs):
342342

343343
token_info = self._token_info(token, method_token_info, **kwargs)
344344

345-
if method_token_info == 'instropect' and not token_info['active']:
345+
if method_token_info == 'introspect' and not token_info['active']:
346346
raise KeycloakInvalidTokenError(
347347
"Token expired or invalid."
348348
)

0 commit comments

Comments
 (0)