Client Auth endpoint logic, first run.

This commit is contained in:
Jeremy Zimmerman 2023-02-16 14:53:31 -05:00
parent c38389abd4
commit fcf620eecd
3 changed files with 14 additions and 7 deletions

View file

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

View file

@ -4,10 +4,17 @@ export function validateISSClientTag(clientTag) {
const store = useMainStore()
const clientName = store.issConfig.clientName;
const resp = store.validateClientTag(clientTag);
console.log(resp);
store.validateClientTag(clientTag)
.then(
(response) => {
// Success
console.log(response);
},
(error) => {
// Error
console.log("error: " + error);
}
);
return true;
};

View file

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