import { AppConfigType } from '../entities/AppConfig'; import { Agent } from '../entities/Agent'; export class AgentAuthClient { private serviceBaseUrl: string; constructor(appConfig: AppConfigType, private $http: HttpService) { this.serviceBaseUrl = appConfig.serviceBaseUrl; } user() { return this.$http.get(this.serviceBaseUrl + '/api/user'); } login(username: string, password: string) { return this.$http.post(this.serviceBaseUrl + '/api/login', { username: username, password: password }); } }