Following is a working example you may copy & paste to the Developer Tools console:
Relution.web.login({
// put your credentials here:
userName: 't.beckmann',
password: 'mcap'
}, {
// what Relution server to talk to:
serverUrl: 'http://localhost:8080'
}).then(function (response) {
var user = Relution.security.getCurrentUser();
return response;
}).then(function (loginResponse) {
return Relution.web.ajax({
method: 'GET',
url: '/gofer/system/security/currentAuthorization'
}).then(function (currentAuthorizationResponse) {
return loginResponse;
});
}).finally(function () {
return Relution.web.logout();
}).then(function (response) {
var user = Relution.security.getCurrentUser();
return response;
}).done();