Skip to content

Commit

Permalink
Encode the certificate on IDP creation
Browse files Browse the repository at this point in the history
  • Loading branch information
sumedhe committed Aug 10, 2021
1 parent cfe26a4 commit 0ce2544
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export const EnterpriseIDPCreateWizard: FC<EnterpriseIDPCreateWizardProps> = (
];
// Certificates: bind the JWKS URL if exists otherwise pem
identityProvider[ "certificate" ][ "jwksUri" ] = values.jwks_endpoint ?? EMPTY_STRING;
identityProvider[ "certificate" ][ "certificates" ] = [ pemString ?? EMPTY_STRING ];
identityProvider[ "certificate" ][ "certificates" ] = [ pemString ? btoa(pemString) : EMPTY_STRING ];

} else {

Expand Down Expand Up @@ -295,7 +295,7 @@ export const EnterpriseIDPCreateWizard: FC<EnterpriseIDPCreateWizardProps> = (
{ key: "IsSLORequestAccepted", value: "true" }
];
}
identityProvider[ "certificate" ][ "certificates" ] = [ pemString ?? EMPTY_STRING ];
identityProvider[ "certificate" ][ "certificates" ] = [ pemString ? btoa(pemString) : EMPTY_STRING ];

}

Expand Down Expand Up @@ -720,7 +720,7 @@ export const EnterpriseIDPCreateWizard: FC<EnterpriseIDPCreateWizardProps> = (
onChange={ (result) => {
setPastedPEMContent(result.pastedContent);
setSelectedCertificateFile(result.file);
setPemString(result.serialized?.pemStripped);
setPemString(result.serialized?.pem);
/**
* If there's pasted content or a file, but it hasn't been serialized
* and if it's not valid then we must disable the next button. This condition
Expand Down

0 comments on commit 0ce2544

Please sign in to comment.