public async Task <bool> DeleteAuthorizationPermissionAsync(string realm, string clientId, AuthorizationPermissionType permissionType, string permissionId) { var response = await GetBaseUrl(realm) .AppendPathSegment($"/admin/realms/{realm}/clients/{clientId}/authz/resource-server/permission") .AppendPathSegment(permissionType == AuthorizationPermissionType.Scope ? "/scope" : "/resource") .AppendPathSegment($"/{permissionId}") .DeleteAsync() .ConfigureAwait(false); return(response.IsSuccessStatusCode); }
public async Task <AuthorizationPermission> GetAuthorizationPermissionByIdAsync(string realm, string clientId, AuthorizationPermissionType permissionType, string permissionId) => await GetBaseUrl(realm) .AppendPathSegment($"/admin/realms/{realm}/clients/{clientId}/authz/resource-server/permission") .AppendPathSegment(permissionType == AuthorizationPermissionType.Scope ? "/scope" : "/resource") .AppendPathSegment($"/{permissionId}") .GetJsonAsync <AuthorizationPermission>() .ConfigureAwait(false);