11// Copyright (c) Cosmo Tech.
22// Licensed under the MIT license.
33
4- const guid = require ( 'guid ' ) ;
4+ const uuid = require ( 'uuid ' ) ;
55const jwt = require ( 'jsonwebtoken' ) ;
66const jwksClient = require ( 'jwks-rsa' ) ;
77const { MSAL_CONFIG , GUID_PARAMETERS , REQUIRED_PARAMETERS , getConfigValue } = require ( './config' ) ;
@@ -19,7 +19,7 @@ const sanitizeAndValidateConfig = () => {
1919
2020 for ( const parameter of GUID_PARAMETERS ) {
2121 const sanitizedValue = getConfigValue ( parameter ) ;
22- if ( sanitizedValue && ! guid . isGuid ( sanitizedValue ) )
22+ if ( sanitizedValue && ! uuid . validate ( sanitizedValue ) )
2323 throw new ServiceAccountError (
2424 500 ,
2525 'Configuration error' ,
@@ -88,7 +88,7 @@ const validateQuery = async (req) => {
8888 ) ;
8989
9090 for ( const reportId of reportsIds ) {
91- if ( ! guid . isGuid ( reportId ) )
91+ if ( ! uuid . validate ( reportId ) )
9292 throw new ServiceAccountError (
9393 400 ,
9494 'Bad request' ,
@@ -98,7 +98,7 @@ const validateQuery = async (req) => {
9898
9999 // Check PowerBI workspace id parameter
100100 const workspaceId = req ?. body ?. workspaceId ;
101- if ( workspaceId != null && ! guid . isGuid ( workspaceId ) )
101+ if ( workspaceId != null && ! uuid . validate ( workspaceId ) )
102102 throw new ServiceAccountError (
103103 400 ,
104104 'Bad request' ,
0 commit comments