Refactor entitlement request argument name
This commit is contained in:
parent
d7d91cfbc0
commit
94d4afa11c
1 changed files with 3 additions and 3 deletions
|
@ -118,7 +118,7 @@
|
|||
/**
|
||||
* Obtains all entitlements from a Keycloak Server based on a give resourceServerId.
|
||||
*/
|
||||
this.entitlement = function (resourceSeververId, permissionRequests) {
|
||||
this.entitlement = function (resourceSeververId, entitlementRequest ) {
|
||||
this.then = function (onGrant, onDeny, onError) {
|
||||
var request = new XMLHttpRequest();
|
||||
|
||||
|
@ -150,10 +150,10 @@
|
|||
|
||||
var erJson = null
|
||||
|
||||
if(permissionRequests) {
|
||||
if(entitlementRequest) {
|
||||
request.open('POST', keycloak.authServerUrl + '/realms/' + keycloak.realm + '/authz/entitlement/' + resourceSeververId, true);
|
||||
request.setRequestHeader("Content-type", "application/json");
|
||||
erJson = JSON.stringify(permissionRequests)
|
||||
erJson = JSON.stringify(entitlementRequest)
|
||||
} else {
|
||||
request.open('GET', keycloak.authServerUrl + '/realms/' + keycloak.realm + '/authz/entitlement/' + resourceSeververId, true);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue