Skip to content

Commit

Permalink
Fix null pointer exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thisara-Welmilla committed Oct 18, 2024
1 parent 9ca9ee5 commit 17f7a54
Showing 1 changed file with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1770,8 +1770,14 @@ private void updateFederatedAuthenticatorConfig(IdentityProvider idp, FederatedA
authConfig.setName(base64URLDecode(authenticator.getAuthenticatorId()));
authConfig.setDisplayName(getDisplayNameOfAuthenticator(authConfig.getName()));
authConfig.setEnabled(authenticator.getIsEnabled());

String definedByType = null;
if (authenticator.getDefinedBy() != null) {
definedByType = authenticator.getDefinedBy().toString();
}
authConfig.setDefinedByType(resolveDefinedByType(authConfig.getName(),
authenticator.getDefinedBy().toString(), isNewFederatedAuthenticator));
definedByType, isNewFederatedAuthenticator));

List<org.wso2.carbon.identity.api.server.idp.v1.model.Property> authProperties =
authenticator.getProperties();
if (IdentityApplicationConstants.Authenticator.SAML2SSO.FED_AUTH_NAME.equals(authConfig.getName())) {
Expand Down Expand Up @@ -2841,8 +2847,13 @@ private FederatedAuthenticatorConfig updateFederatedAuthenticatorConfig(String f
authConfig.setName(authenticatorName);
authConfig.setDisplayName(getDisplayNameOfAuthenticator(authenticatorName));
authConfig.setEnabled(authenticator.getIsEnabled());
authConfig.setDefinedByType(resolveDefinedByType(authenticatorName,
authenticator.getDefinedBy().toString(), false));

String definedByType = null;
if (authenticator.getDefinedBy() != null) {
definedByType = authenticator.getDefinedBy().toString();
}
authConfig.setDefinedByType(resolveDefinedByType(authenticatorName, definedByType, false));

List<org.wso2.carbon.identity.api.server.idp.v1.model.Property> authProperties = authenticator.getProperties();
if (IdentityApplicationConstants.Authenticator.SAML2SSO.FED_AUTH_NAME.equals(authenticatorName)) {
validateSamlMetadata(authProperties);
Expand Down

0 comments on commit 17f7a54

Please sign in to comment.