Testing the new clientauth api.

This commit is contained in:
Jeremy Zimmerman 2023-02-16 12:45:05 -05:00
parent 7d342213e9
commit c38389abd4
5 changed files with 9678 additions and 5283 deletions

14932
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -89,7 +89,11 @@ const endpoints = {
},
GooglePlaces: {
url: "https://maps.googleapis.com/maps/api/js?key={apiKey}&libraries=places"
}
},
ValidateClientTag: {
url: "/clientauth/api/v1/validateClientTag",
method: "GET",
},
};
export { endpoints };

View file

@ -0,0 +1,13 @@
import { useMainStore } from '@/store';
export function validateISSClientTag(clientTag) {
const store = useMainStore()
const clientName = store.issConfig.clientName;
const resp = store.validateClientTag(clientTag);
console.log(resp);
return true;
};

View file

@ -148,6 +148,7 @@
import { errorMessages } from "@/constants/error-messages";
import BaseFormMixin from '@/mixins/base-form-mixin.js';
import { useMainStore } from '@/store';
import { validateISSClientTag } from "@/helpers/clientauth-helper";
//define validation rules
defineRule("loss-date-required", required(errorMessages.LOSS_DATE_REQUIRED));
@ -184,6 +185,8 @@
},
setup() {
const mainStore = useMainStore();
const resp = validateISSClientTag("asdf");
return { mainStore };
},
async beforeRouteEnter(to, from, next)

View file

@ -893,6 +893,13 @@ export const useMainStore = defineStore({
});
},
validateClientTag({ clientTag }) {
return globalMethods.callHttpClient({
methods: endpoints.ValidateClientTag.method,
endpoint: `${endpoints.ValidateClientTag.url}/${"asdf"}`,
});
},
saveServiceLocation(serviceLocationInfo) {
this.updateServiceLocation(serviceLocationInfo);
},