-
Notifications
You must be signed in to change notification settings - Fork 544
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add service layer support for the custom local auth extensions.
- Loading branch information
1 parent
4a85b28
commit c096f8d
Showing
7 changed files
with
306 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...g/wso2/carbon/identity/application/common/internal/ApplicationCommonServiceComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package org.wso2.carbon.identity.application.common.internal; | ||
|
||
import org.apache.commons.logging.Log; | ||
import org.apache.commons.logging.LogFactory; | ||
import org.osgi.service.component.annotations.Component; | ||
import org.osgi.service.component.annotations.Reference; | ||
import org.osgi.service.component.annotations.ReferenceCardinality; | ||
import org.osgi.service.component.annotations.ReferencePolicy; | ||
import org.wso2.carbon.identity.action.management.ActionManagementService; | ||
|
||
/** | ||
* OSGI service component for the Application Common Service Component. | ||
*/ | ||
@Component( | ||
name = "application.common.service.component", | ||
immediate = true | ||
) | ||
public class ApplicationCommonServiceComponent { | ||
|
||
private static final Log LOG = LogFactory.getLog(ApplicationCommonServiceComponent.class); | ||
|
||
@Reference( | ||
name = "action.management.service", | ||
service = ActionManagementService.class, | ||
cardinality = ReferenceCardinality.MANDATORY, | ||
policy = ReferencePolicy.DYNAMIC, | ||
unbind = "unsetActionManagementService" | ||
) | ||
protected void setActionManagementService(ActionManagementService actionManagementService) { | ||
|
||
if (LOG.isDebugEnabled()) { | ||
LOG.debug( | ||
"Registering a reference for ActionManagementService in the ApplicationCommonServiceComponent."); | ||
} | ||
ApplicationCommonServiceDataHolder.getInstance().setActionManagementService(actionManagementService); | ||
} | ||
|
||
protected void unsetActionManagementService(ActionManagementService actionManagementService) { | ||
|
||
if (LOG.isDebugEnabled()) { | ||
LOG.debug("Unregistering the reference for ActionManagementService in the " + | ||
"ApplicationCommonServiceComponent."); | ||
} | ||
if (ApplicationCommonServiceDataHolder.getInstance().getActionManagementService() | ||
.equals(actionManagementService)) { | ||
ApplicationCommonServiceDataHolder.getInstance().setActionManagementService(null); | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
.../wso2/carbon/identity/application/common/internal/ApplicationCommonServiceDataHolder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package org.wso2.carbon.identity.application.common.internal; | ||
|
||
import org.wso2.carbon.identity.action.management.ActionManagementService; | ||
|
||
/** | ||
* The data holder for the Application Common Service Component. | ||
*/ | ||
public class ApplicationCommonServiceDataHolder { | ||
|
||
private static final ApplicationCommonServiceDataHolder INSTANCE = new ApplicationCommonServiceDataHolder(); | ||
|
||
private ActionManagementService actionManagementService; | ||
|
||
private ApplicationCommonServiceDataHolder() { | ||
|
||
} | ||
|
||
public static ApplicationCommonServiceDataHolder getInstance() { | ||
|
||
return INSTANCE; | ||
} | ||
|
||
public ActionManagementService getActionManagementService() { | ||
|
||
return actionManagementService; | ||
} | ||
|
||
public void setActionManagementService(ActionManagementService actionManagementService) { | ||
|
||
this.actionManagementService = actionManagementService; | ||
} | ||
} |
49 changes: 0 additions & 49 deletions
49
...va/org/wso2/carbon/identity/application/common/model/VerificationAuthenticatorConfig.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.