in src/app/devices/addDevice/components/addDevice.tsx [96:179]
text: t(ResourceKeys.deviceIdentity.authenticationType.ca.type)
}
]
}
required={true}
/>
);
};
const renderSymmetricKeySection = () => {
return (
<>
<TextField
ariaLabel={t(ResourceKeys.deviceIdentity.authenticationType.symmetricKey.primaryKey)}
label={t(ResourceKeys.deviceIdentity.authenticationType.symmetricKey.primaryKey)}
value={primaryKey.value}
required={true}
onChange={changePrimaryKey}
type={'password'}
canRevealPassword={true}
revealPasswordAriaLabel={t(ResourceKeys.common.revealPassword)}
errorMessage={!!primaryKey.error ? t(primaryKey.error) : ''}
description={t(ResourceKeys.deviceIdentity.authenticationType.symmetricKey.primaryKeyTooltip)}
/>
<TextField
ariaLabel={t(ResourceKeys.deviceIdentity.authenticationType.symmetricKey.secondaryKey)}
label={t(ResourceKeys.deviceIdentity.authenticationType.symmetricKey.secondaryKey)}
value={secondaryKey.value}
required={true}
onChange={changeSecondaryKey}
type={'password'}
canRevealPassword={true}
revealPasswordAriaLabel={t(ResourceKeys.common.revealPassword)}
errorMessage={!!secondaryKey.error ? t(secondaryKey.error) : ''}
description={t(ResourceKeys.deviceIdentity.authenticationType.symmetricKey.secondaryKeyTooltip)}
/>
</>
);
};
const renderSelfSignedSection = () => {
return (
<>
<TextField
ariaLabel={t(ResourceKeys.deviceIdentity.authenticationType.selfSigned.primaryThumbprint)}
label={t(ResourceKeys.deviceIdentity.authenticationType.selfSigned.primaryThumbprint)}
value={primaryKey.thumbprint}
required={true}
onChange={changePrimaryThumbprint}
type={'password'}
canRevealPassword={true}
revealPasswordAriaLabel={t(ResourceKeys.common.revealPassword)}
errorMessage={!!primaryKey.thumbprintError ? t(primaryKey.thumbprintError) : ''}
description={t(ResourceKeys.deviceIdentity.authenticationType.selfSigned.primaryThumbprintTooltip)}
/>
<TextField
ariaLabel={t(ResourceKeys.deviceIdentity.authenticationType.selfSigned.secondaryThumbprint)}
label={t(ResourceKeys.deviceIdentity.authenticationType.selfSigned.secondaryThumbprint)}
value={secondaryKey.thumbprint}
required={true}
onChange={changeSecondaryThumbprint}
type={'password'}
canRevealPassword={true}
revealPasswordAriaLabel={t(ResourceKeys.common.revealPassword)}
errorMessage={!!secondaryKey.thumbprintError ? t(secondaryKey.thumbprintError) : ''}
description={t(ResourceKeys.deviceIdentity.authenticationType.selfSigned.secondaryThumbprintTooltip)}
/>
</>
);
};
const showAuthentication = () => {
return (
<div className="authentication">
{getAuthType()}
{authenticationType === DeviceAuthenticationType.SymmetricKey &&
<>
<Checkbox
className="autoGenerateButton"
label={t(ResourceKeys.deviceIdentity.authenticationType.symmetricKey.autoGenerate)}
checked={autoGenerateKeys}
onChange={changeAutoGenerateKeys}
/>
{!autoGenerateKeys &&