Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.basePath = this.config.oauth2.host; //Auth Call
this.authentications = {
'basicAuth': {type: 'oauth2', accessToken: ''}
};
this.host = this.config.oauth2.host;
this.initOauth();// jshint ignore:line
if (this.config.accessToken) {
this.setTicket(this.config.accessToken);
}
}
Emitter.call(this);
}
this.className = 'BpmAuth';
this.config = config;
this.ticket = undefined;
this.basePath = config.hostBpm + '/' + this.config.contextRootBpm; //Activiti Call
this.authentications = {
'basicAuth': {type: 'activiti', ticket: ''}
};
if (this.config.ticketBpm) {
this.setTicket(config.ticketBpm);
}
Emitter.call(this);
}
constructor(config) {
config = this.configureJsApi(config);
Emitter.call(this);
}
constructor(host) {
super();
this.host = host;
Emitter.call(this);
}
this.bpmClient.on('unauthorized', ()=> {
this.invalidateSession();
});
if (this.config.provider === 'OAUTH') {
this.oauth2Auth = new Oauth2Auth(this.config);
this.setAuthenticationClientECMBPM(this.oauth2Auth.getAuthentication(), this.oauth2Auth.getAuthentication());
} else {
this.bpmAuth = new BpmAuth(this.config);
this.ecmAuth = new EcmAuth(this.config);
this.setAuthenticationClientECMBPM(this.ecmAuth.getAuthentication(), this.bpmAuth.getAuthentication());
}
this.initObjects();
Emitter.call(this);
}
this.basePath = this.config.hostEcm + '/' + this.config.contextRoot + '/api/-default-/public/authentication/versions/1'; //Auth Call
if (this.config.domainPrefix) {
this.ticketStorageLabel = this.config.domainPrefix.concat('-ticket-ECM');
} else {
this.ticketStorageLabel = 'ticket-ECM';
}
if (this.config.ticketEcm) {
this.setTicket(config.ticketEcm);
} else if (this.storage.getItem(this.ticketStorageLabel)) {
this.setTicket(this.storage.getItem(this.ticketStorageLabel));
}
Emitter.call(this);
}
constructor() {
super();
Emitter.call(this);
}