Skip to content

Commit

Permalink
use idp management facade
Browse files Browse the repository at this point in the history
  • Loading branch information
DilshanSenarath committed Dec 19, 2024
1 parent 1915654 commit 428f528
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ private void updateLocalAndOutboundAuthenticationConfiguration(int applicationId
for (LocalAuthenticatorConfig lclAuthenticator : authStep
.getLocalAuthenticatorConfigs()) {
// set the identity provider name to LOCAL.
int authenticatorId = getAuthentictorID(connection, tenantID,
int authenticatorId = getAuthenticatorID(connection, tenantID,
ApplicationConstants.LOCAL_IDP_NAME, lclAuthenticator.getName());
if (authenticatorId < 0) {
authenticatorId = addAuthenticator(connection, tenantID,
Expand Down Expand Up @@ -1623,7 +1623,7 @@ private void updateLocalAndOutboundAuthenticationConfiguration(int applicationId
for (FederatedAuthenticatorConfig authenticator : authenticators) {
// ID, TENANT_ID, AUTHENTICATOR_ID
if (authenticator != null) {
int authenticatorId = getAuthentictorID(connection, tenantID,
int authenticatorId = getAuthenticatorID(connection, tenantID,
idpName, authenticator.getName());
if (authenticatorId > 0) {
storeStepIDPAuthnPrepStmt.setInt(1, stepId);
Expand Down Expand Up @@ -5015,8 +5015,8 @@ public boolean isApplicationExists(String serviceProviderName, String tenantName
* @return
* @throws SQLException
*/
private int getAuthentictorID(Connection conn, int tenantId, String idpName,
String authenticatorName) throws SQLException {
private int getAuthenticatorID(Connection conn, int tenantId, String idpName,
String authenticatorName) throws SQLException {

if (idpName == null || idpName.isEmpty()) {
return -1;
Expand Down Expand Up @@ -6687,7 +6687,7 @@ public String[] getSPsAssociatedWithFederatedIDPAuthenticator(String idpName,

try {
int defaultAuthenticatorId =
getAuthentictorID(dbConnection, tenantId, idpName, defaultAuthenticatorName);
getAuthenticatorID(dbConnection, tenantId, idpName, defaultAuthenticatorName);

prepStmt = dbConnection.prepareStatement(
ApplicationMgtDBQueries.GET_SP_UUIDS_ASSOCIATED_AUTH_FLOW_AUTHENTICATOR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ public ConnectedAppsResult getConnectedApplications(String resourceId, int limit
*/
public boolean isIdpReferredBySP(String idpName, int tenantId) throws IdentityProviderManagementException {

return idPMgtDAO.isIdpReferredBySP(idpName, tenantId);
return idPManagementFacade.isIdpReferredBySP(idpName, tenantId);
}

/**
Expand All @@ -1009,7 +1009,7 @@ public boolean isIdpReferredBySP(String idpName, int tenantId) throws IdentityPr
public boolean isAuthenticatorReferredBySP(String idpName, String authenticatorName, int tenantId)
throws IdentityProviderManagementException {

return idPMgtDAO.isAuthenticatorReferredBySP(idpName, authenticatorName, tenantId);
return idPManagementFacade.isAuthenticatorReferredBySP(idpName, authenticatorName, tenantId);
}

/**
Expand All @@ -1024,7 +1024,7 @@ public boolean isAuthenticatorReferredBySP(String idpName, String authenticatorN
public boolean isOutboundConnectorReferredBySP(String idpName, String connectorName, int tenantId)
throws IdentityProviderManagementException {

return idPMgtDAO.isOutboundConnectorReferredBySP(idpName, connectorName, tenantId);
return idPManagementFacade.isOutboundConnectorReferredBySP(idpName, connectorName, tenantId);
}

public ConnectedAppsResult getConnectedAppsOfLocalAuthenticator(String authenticatorId, int tenantId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,16 @@ public boolean isIdpReferredBySP(String idPName, int tenantId) throws IdentityPr
return dao.isIdpReferredBySP(idPName, tenantId);
}

public boolean isAuthenticatorReferredBySP(String idpName, String authenticatorName, int tenantId) throws IdentityProviderManagementException {

return dao.isAuthenticatorReferredBySP(idpName, authenticatorName, tenantId);
}

public boolean isOutboundConnectorReferredBySP(String idpName, String connectorName, int tenantId) throws IdentityProviderManagementException {

return dao.isOutboundConnectorReferredBySP(idpName, connectorName, tenantId);
}

public void deleteIdP(String idPName, int tenantId, String tenantDomain)
throws IdentityProviderManagementException {

Expand Down

0 comments on commit 428f528

Please sign in to comment.