keycloak-auth-utils
Advanced tools
Comparing version
@@ -90,4 +90,4 @@ /*! | ||
const params = { | ||
application_session_state: sessionId, | ||
application_session_host: sessionHost, | ||
client_session_state: sessionId, | ||
client_session_host: sessionHost, | ||
code: code, | ||
@@ -94,0 +94,0 @@ grant_type: 'authorization_code', |
@@ -129,2 +129,9 @@ /*! | ||
Token.prototype.hasRealmRole = function hasRealmRole (roleName) { | ||
// Make sure we have these properties before we check for a certain realm level role! | ||
// Without this we attempt to access an undefined property on token | ||
// for a user with no realm level roles. | ||
if (!this.content.realm_access || !this.content.realm_access.roles) { | ||
return false; | ||
} | ||
return (this.content.realm_access.roles.indexOf(roleName) >= 0); | ||
@@ -131,0 +138,0 @@ }; |
{ | ||
"name": "keycloak-auth-utils", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Keycloak OAuth client.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3784979
0.01%133114
0