@uiapplib/ngx-ui-web-lib 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/esm2022/lib/interceptors/header-interceptor/http-header.interceptor.mjs +11 -10
- package/esm2022/lib/models/LibConstants.mjs +5 -7
- package/esm2022/lib/services/chatbot/chatbot.service.mjs +2 -4
- package/esm2022/lib/services/login/login.service.mjs +3 -3
- package/fesm2022/uiapplib-ngx-ui-web-lib.mjs +16 -20
- package/fesm2022/uiapplib-ngx-ui-web-lib.mjs.map +1 -1
- package/lib/models/LibConstants.d.ts +2 -2
- package/lib/models/LibConstants.d.ts.map +1 -1
- package/lib/services/chatbot/chatbot.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -231,19 +231,17 @@ const LibConstants = {
|
|
|
231
231
|
appVersion: window["env"]["appVersion"] || "localhost",
|
|
232
232
|
ssoCookieName: window["env"]["ssoCookieName"] || "SSO_COOKIE_DEV",
|
|
233
233
|
ssoDomain: window["env"]["ssoDomain"] || ".mdes.ms.gov",
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
oauthClientUser: window["env"]["oauthClientUser"] || "mobile",
|
|
235
|
+
oauthClientSecret: window["env"]["oauthClientSecret"] || "pin",
|
|
236
236
|
oauthWingsClientUser: window["env"]["oauthWingsClientUser"] || "wingsuser",
|
|
237
237
|
oauthWingsClientSecret: window["env"]["oauthWingsClientSecret"] || "wingspass",
|
|
238
238
|
enableChatbot: window["env"]["enableChatbot"] || 'true',
|
|
239
239
|
enableLanguageChange: window["env"]["enableLanguageChange"] || 'false',
|
|
240
240
|
PhaseTwoProofOfUIView: window["env"]["PhaseTwoProofOfUIView"] || 'false',
|
|
241
241
|
koreAiWebSdkUrl: window["env"]["koreAiWebSdkUrl"] || "http://localhost:8080",
|
|
242
|
-
koreAiJwtService: window["env"]["koreAiJwtService"] || "http://localhost:
|
|
242
|
+
koreAiJwtService: window["env"]["koreAiJwtService"] || "http://localhost:9016/jwt-service/users/sts",
|
|
243
243
|
koreAiChatbotServer: window["env"]["koreAiChatbotServer"] || "http://stchatbot.mdes.ms.gov:8081/api/",
|
|
244
|
-
|
|
245
|
-
koreAiClientSecret: window["env"]["koreAiClientSecret"] || "+Y10D8ys3jO+espPHarfGP2CbtFHELYvRCZkzs/yZMk=",
|
|
246
|
-
koreAiBotId: window["env"]["koreAiBotId"] || "st-1c88bdf7-ae3c-5f33-8120-1a838c1abbb1",
|
|
244
|
+
koreAiBotId: window["env"]["koreAiBotId"] || "st-3b7b7689-b7ed-528f-bfa2-207ac20c42fe",
|
|
247
245
|
koreAiBotName: window["env"]["koreAiBotName"] || "ReEmployMSChat",
|
|
248
246
|
isAddressValidationEnabled: window["env"]["isAddressValidationEnabled"] || "false",
|
|
249
247
|
blankString: '',
|
|
@@ -1648,12 +1646,12 @@ class LoginService {
|
|
|
1648
1646
|
async refreshToken(refreshToken) {
|
|
1649
1647
|
let headers = new HttpHeaders({
|
|
1650
1648
|
"Accept": "application/x-www-form-urlencoded",
|
|
1651
|
-
|
|
1649
|
+
'Authorization': `Basic ` + btoa(`${LibConstants.oauthClientUser}:${LibConstants.oauthClientSecret}`)
|
|
1652
1650
|
});
|
|
1653
1651
|
this.options = { headers: headers };
|
|
1654
1652
|
let authData = new FormData();
|
|
1655
1653
|
authData.set('grant_type', 'refresh_token');
|
|
1656
|
-
|
|
1654
|
+
authData.set('client_id', LibConstants.oauthClientUser);
|
|
1657
1655
|
authData.set('refresh_token', refreshToken);
|
|
1658
1656
|
return this.util.postFormData(`oauth/token`, authData, this.options).toPromise();
|
|
1659
1657
|
}
|
|
@@ -2096,7 +2094,6 @@ class ChatbotService {
|
|
|
2096
2094
|
customData: this.map.get(this.util.getStateLowercase()) ? this.map.get(this.util.getStateLowercase()) : this.map.get('ms'),
|
|
2097
2095
|
// customData: { connectingMessage: "Welcome to ReEmployME. I am your virtual assistant to help you with ME related queries.", hoverMessage: "Ask Blue", botState: "ME", showCollectUserDetailForm: false, showDisclaimerPopUp: true, botIconImageName: "chatboticon.png", botAvatarImageName: "chatboticon.png", rootFilePath: "UI/", supportedLanguages: ["en", "es"], initialLanguage: "en", disclaimerPopup: { header: "Important Message", message: `The virtual assistant will need to ask for specific identifying information that is needed to answer you question(s) such as date of birth or Social Security number. The agency follows strict federal security guidelines to protect your sensitive information. To further protect your information, if you are on a public computer, please log out and close your browser when you are finished.`, }, headerConfig: { showLanguageToggle: true, showMinimizeButton: true, showExpandbutton: false, showReloadButton: true, } }
|
|
2098
2096
|
}; // bot name is case sensitive
|
|
2099
|
-
this.botOptions.clientId = LibConstants.koreAiClientId;
|
|
2100
2097
|
//this.botOptions.clientSecret = LibConstants.koreAiClientSecret;
|
|
2101
2098
|
//this.botOptions.reemployUsBearerToken= "";
|
|
2102
2099
|
// will need to pass token to koreAiChatBotServer when authentication needs to be validated for server side api call
|
|
@@ -2124,8 +2121,7 @@ class ChatbotService {
|
|
|
2124
2121
|
}
|
|
2125
2122
|
assertion(options, callback) {
|
|
2126
2123
|
var jsonData = {
|
|
2127
|
-
"
|
|
2128
|
-
"clientSecret": this.botOptions.clientSecret,
|
|
2124
|
+
"botId": LibConstants.koreAiBotId,
|
|
2129
2125
|
"identity": options.userIdentity || this.botOptions.userIdentity,
|
|
2130
2126
|
"aud": "",
|
|
2131
2127
|
"isAnonymous": (this.ls.getUser() == null),
|
|
@@ -51527,15 +51523,15 @@ class HttpHeaderInterceptor {
|
|
|
51527
51523
|
.append('Authorization', `Bearer ${currentUser.access_token}`)
|
|
51528
51524
|
});
|
|
51529
51525
|
}
|
|
51530
|
-
|
|
51531
|
-
|
|
51532
|
-
|
|
51533
|
-
|
|
51534
|
-
|
|
51535
|
-
|
|
51536
|
-
|
|
51537
|
-
|
|
51538
|
-
}
|
|
51526
|
+
if (!(currentUser && currentUser.username) && (request.url.includes("/oauth/token") || request.url.includes('/check_token'))) {
|
|
51527
|
+
if (!request.headers.get('Authorization')) {
|
|
51528
|
+
request = request.clone({
|
|
51529
|
+
withCredentials: false,
|
|
51530
|
+
headers: request.headers
|
|
51531
|
+
.append('Authorization', `Basic ` + btoa(`${LibConstants.oauthClientUser}:${LibConstants.oauthClientSecret}`))
|
|
51532
|
+
});
|
|
51533
|
+
}
|
|
51534
|
+
}
|
|
51539
51535
|
let value = localStorage.getItem('language');
|
|
51540
51536
|
let language = value != null ? value : 'en';
|
|
51541
51537
|
request = request.clone({
|