@uiapplib/ngx-ui-web-lib 0.0.1 → 0.0.3
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 +10 -10
- package/esm2022/lib/models/LibConstants.mjs +4 -9
- package/esm2022/lib/services/chatbot/chatbot.service.mjs +2 -4
- package/esm2022/lib/services/login/login.service.mjs +5 -7
- package/fesm2022/uiapplib-ngx-ui-web-lib.mjs +17 -26
- package/fesm2022/uiapplib-ngx-ui-web-lib.mjs.map +1 -1
- package/lib/models/LibConstants.d.ts +1 -4
- package/lib/models/LibConstants.d.ts.map +1 -1
- package/lib/services/chatbot/chatbot.service.d.ts.map +1 -1
- package/lib/services/login/login.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -231,19 +231,14 @@ 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
|
-
//oauthClientSecret : window["env"]["oauthClientSecret"] || "pin",
|
|
236
|
-
oauthWingsClientUser: window["env"]["oauthWingsClientUser"] || "wingsuser",
|
|
237
|
-
oauthWingsClientSecret: window["env"]["oauthWingsClientSecret"] || "wingspass",
|
|
234
|
+
ocu: window["env"]["ocu"] || "mobile",
|
|
238
235
|
enableChatbot: window["env"]["enableChatbot"] || 'true',
|
|
239
236
|
enableLanguageChange: window["env"]["enableLanguageChange"] || 'false',
|
|
240
237
|
PhaseTwoProofOfUIView: window["env"]["PhaseTwoProofOfUIView"] || 'false',
|
|
241
238
|
koreAiWebSdkUrl: window["env"]["koreAiWebSdkUrl"] || "http://localhost:8080",
|
|
242
|
-
koreAiJwtService: window["env"]["koreAiJwtService"] || "http://localhost:
|
|
239
|
+
koreAiJwtService: window["env"]["koreAiJwtService"] || "http://localhost:9016/jwt-service/users/sts",
|
|
243
240
|
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",
|
|
241
|
+
koreAiBotId: window["env"]["koreAiBotId"] || "st-3b7b7689-b7ed-528f-bfa2-207ac20c42fe",
|
|
247
242
|
koreAiBotName: window["env"]["koreAiBotName"] || "ReEmployMSChat",
|
|
248
243
|
isAddressValidationEnabled: window["env"]["isAddressValidationEnabled"] || "false",
|
|
249
244
|
blankString: '',
|
|
@@ -1647,25 +1642,23 @@ class LoginService {
|
|
|
1647
1642
|
}
|
|
1648
1643
|
async refreshToken(refreshToken) {
|
|
1649
1644
|
let headers = new HttpHeaders({
|
|
1650
|
-
"Accept": "application/x-www-form-urlencoded"
|
|
1651
|
-
//'Authorization': `Basic ` + btoa(`${LibConstants.oauthClientUser}:${LibConstants.oauthClientSecret}`)
|
|
1645
|
+
"Accept": "application/x-www-form-urlencoded"
|
|
1652
1646
|
});
|
|
1653
1647
|
this.options = { headers: headers };
|
|
1654
1648
|
let authData = new FormData();
|
|
1655
1649
|
authData.set('grant_type', 'refresh_token');
|
|
1656
|
-
|
|
1650
|
+
authData.set('client_id', LibConstants.ocu);
|
|
1657
1651
|
authData.set('refresh_token', refreshToken);
|
|
1658
1652
|
return this.util.postFormData(`oauth/token`, authData, this.options).toPromise();
|
|
1659
1653
|
}
|
|
1660
1654
|
async refreshTokenWings(refreshToken) {
|
|
1661
1655
|
let headers = new HttpHeaders({
|
|
1662
|
-
"Accept": "application/x-www-form-urlencoded"
|
|
1663
|
-
'Authorization': `Basic ` + btoa(`${LibConstants.oauthWingsClientUser}:${LibConstants.oauthWingsClientSecret}`)
|
|
1656
|
+
"Accept": "application/x-www-form-urlencoded"
|
|
1664
1657
|
});
|
|
1665
1658
|
this.options = { headers: headers };
|
|
1666
1659
|
let authData = new FormData();
|
|
1667
1660
|
authData.set('grant_type', 'refresh_token');
|
|
1668
|
-
authData.set('client_id', LibConstants.oauthWingsClientUser);
|
|
1661
|
+
//authData.set('client_id', LibConstants.oauthWingsClientUser);
|
|
1669
1662
|
authData.set('refresh_token', refreshToken);
|
|
1670
1663
|
return this.util.postFormData(`oauth/token`, authData, this.options).toPromise();
|
|
1671
1664
|
}
|
|
@@ -2096,7 +2089,6 @@ class ChatbotService {
|
|
|
2096
2089
|
customData: this.map.get(this.util.getStateLowercase()) ? this.map.get(this.util.getStateLowercase()) : this.map.get('ms'),
|
|
2097
2090
|
// 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
2091
|
}; // bot name is case sensitive
|
|
2099
|
-
this.botOptions.clientId = LibConstants.koreAiClientId;
|
|
2100
2092
|
//this.botOptions.clientSecret = LibConstants.koreAiClientSecret;
|
|
2101
2093
|
//this.botOptions.reemployUsBearerToken= "";
|
|
2102
2094
|
// will need to pass token to koreAiChatBotServer when authentication needs to be validated for server side api call
|
|
@@ -2124,8 +2116,7 @@ class ChatbotService {
|
|
|
2124
2116
|
}
|
|
2125
2117
|
assertion(options, callback) {
|
|
2126
2118
|
var jsonData = {
|
|
2127
|
-
"
|
|
2128
|
-
"clientSecret": this.botOptions.clientSecret,
|
|
2119
|
+
"botId": LibConstants.koreAiBotId,
|
|
2129
2120
|
"identity": options.userIdentity || this.botOptions.userIdentity,
|
|
2130
2121
|
"aud": "",
|
|
2131
2122
|
"isAnonymous": (this.ls.getUser() == null),
|
|
@@ -51527,15 +51518,15 @@ class HttpHeaderInterceptor {
|
|
|
51527
51518
|
.append('Authorization', `Bearer ${currentUser.access_token}`)
|
|
51528
51519
|
});
|
|
51529
51520
|
}
|
|
51530
|
-
/*if(!(currentUser && currentUser.username) && (request.url.includes("/oauth/token") || request.url.includes('/check_token')) ){
|
|
51531
|
-
|
|
51532
|
-
|
|
51533
|
-
|
|
51534
|
-
|
|
51535
|
-
|
|
51536
|
-
|
|
51537
|
-
|
|
51538
|
-
|
|
51521
|
+
/* if(!(currentUser && currentUser.username) && (request.url.includes("/oauth/token") || request.url.includes('/check_token')) ){
|
|
51522
|
+
if(!request.headers.get('Authorization')){
|
|
51523
|
+
request = request.clone({
|
|
51524
|
+
withCredentials: false,
|
|
51525
|
+
headers: request.headers
|
|
51526
|
+
.append('Authorization', `Basic ` + btoa(`${LibConstants.oauthClientUser}:${LibConstants.oauthClientSecret}`))
|
|
51527
|
+
});
|
|
51528
|
+
}
|
|
51529
|
+
}*/
|
|
51539
51530
|
let value = localStorage.getItem('language');
|
|
51540
51531
|
let language = value != null ? value : 'en';
|
|
51541
51532
|
request = request.clone({
|