diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index 610b5273..d91b5026 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -126,6 +126,10 @@ const endpoints = Object.freeze({ url: '/clientauth/api/v1/clientauth/validate-client-tag', method: 'GET' }, + ValidateClientSignature: { + url: '/clientauth/api/v1/clientauth/validate-client-signature', + method: 'POST' + }, IsVinbyAddressPermissible: { url: '/vehicle/api/v1/vehicle/is-vin-by-address-permissible', method: 'Get' diff --git a/src/helpers/clientauth-helper.js b/src/helpers/clientauth-helper.js index 2bfd53bb..308ec22b 100644 --- a/src/helpers/clientauth-helper.js +++ b/src/helpers/clientauth-helper.js @@ -1,6 +1,6 @@ import { useMainStore } from '@/store'; -const validateISSClientTag = (clientTag) => { +export function validateISSClientTag(clientTag) { const store = useMainStore(); return store.validateClientTag(clientTag) @@ -8,6 +8,14 @@ const validateISSClientTag = (clientTag) => { (response) => response, () => null ); -}; +} -export default validateISSClientTag; +export function validateISSClientSignature(clientTag, token, signature) { + const store = useMainStore(); + + return store.validateClientSignature(clientTag, token, signature) + .then( + (response) => response, + () => null + ); +} diff --git a/src/layouts/entry-page/entry-page.vue b/src/layouts/entry-page/entry-page.vue index 7a50e3a9..920c60d4 100644 --- a/src/layouts/entry-page/entry-page.vue +++ b/src/layouts/entry-page/entry-page.vue @@ -9,7 +9,7 @@