// Register OAuthProviderType into our list. It's called by kernel
public void addPlugin(ComponentPlugin plugin) {
if (plugin instanceof OauthProviderTypeRegistryPlugin) {
OauthProviderTypeRegistryPlugin oauthPlugin = (OauthProviderTypeRegistryPlugin)plugin;
OAuthProviderType oauthPrType = oauthPlugin.getOAuthProviderType();
if (oauthPrType != null && oauthPrType.isEnabled()) {
this.oauthProviderTypes.put(oauthPrType.getKey(), oauthPrType);
log.debug("Added new OAuthProviderType " + oauthPrType);
} else {
log.debug("Skip OAuthProviderType " + oauthPrType + " because it's disabled");
}
} else {