diff --git a/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Endpoints/EndpointOverview.jsx b/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Endpoints/EndpointOverview.jsx index 7bf82518905..fc02c40c31e 100644 --- a/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Endpoints/EndpointOverview.jsx +++ b/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Endpoints/EndpointOverview.jsx @@ -710,6 +710,11 @@ function EndpointOverview(props) { const saveEndpointSecurityConfig = (endpointSecurityObj, enType) => { const { type } = endpointSecurityObj; let newEndpointSecurityObj = endpointSecurityObj; + const secretPlaceholder = '******'; + newEndpointSecurityObj.clientSecret = newEndpointSecurityObj.clientSecret + === secretPlaceholder ? '' : newEndpointSecurityObj.clientSecret; + newEndpointSecurityObj.password = newEndpointSecurityObj.password + === secretPlaceholder ? '' : newEndpointSecurityObj.password; if (type === 'NONE') { newEndpointSecurityObj = { ...CONSTS.DEFAULT_ENDPOINT_SECURITY, type }; } else { diff --git a/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Endpoints/GeneralConfiguration/EndpointSecurity.jsx b/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Endpoints/GeneralConfiguration/EndpointSecurity.jsx index 9f6b5acd104..f50ffddd2df 100644 --- a/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Endpoints/GeneralConfiguration/EndpointSecurity.jsx +++ b/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Endpoints/GeneralConfiguration/EndpointSecurity.jsx @@ -188,13 +188,14 @@ function EndpointSecurity(props) { const { type, username, password, grantType, tokenUrl, clientId, clientSecret, customParameters, } = securityInfo; + const secretPlaceholder = '******'; tmpSecurity.type = type === null ? 'NONE' : type; tmpSecurity.username = username; - tmpSecurity.password = password === '' ? '**********' : password; + tmpSecurity.password = password === '' ? secretPlaceholder : password; tmpSecurity.grantType = grantType; tmpSecurity.tokenUrl = tokenUrl; - tmpSecurity.clientId = clientId === '' ? '********' : clientId; - tmpSecurity.clientSecret = clientSecret === '' ? '********' : clientSecret; + tmpSecurity.clientId = clientId === '' ? secretPlaceholder : clientId; + tmpSecurity.clientSecret = clientSecret === '' ? secretPlaceholder : clientSecret; tmpSecurity.customParameters = customParameters; } setEndpointSecurityInfo(tmpSecurity);