Fork me on GitHub Fork me on GitHub

server.Server


<%

var carbon = require('carbon');
var url = 'https://10.100.0.49:9443/admin/services/';
var server = new carbon.server.Server(url);

print(server.authenticate('admin','admin'));
%>

Overview

Server object allows to do operations on Carbon server using Jaggery.


Operations

Operation Returns Description
Server(options Object)ObjectFollowing parameters should be passed to the constructor:

  • options (Object): an object which contains fields like tenantID, username and server URL.
authenticate(username String, password String)BooleanThis method authenticated user using his password. It accepts the following parameters:

  • username (String) :
  • password (String) :
This returns 'true' if password authenticates username successfully and 'false' otherwise.