On Wed, Nov 2, 2016 at 8:53 PM, Hanen Ben Rhouma <hanen...@gmail.com> wrote:
> Thanks for the reply Gayan, > > Actually I'm facing an issue while trying to deploy the custom user store > jar file under WSO2 IS, though I put it in > <PRODUCT_HOME>/repository/components/dropins > and changed <PRODUCT_HOME>/repository/conf/user-mgt.xml according to the > documentation I'm receiving a ClassNotFound error: > > [2016-11-02 16:16:03,660] ERROR > {org.wso2.carbon.user.core.common.DefaultRealm} > - com.wso2.custom.usermgt.CustomUserStoreManager cannot be found by > org.wso2.carbon.user.core_4.4.9Type class java.lang.ClassNotFoundException > org.wso2.carbon.user.core.UserStoreException: > com.wso2.custom.usermgt.CustomUserStoreManager > cannot be found by org.wso2.carbon.user.core_4.4.9Type class java.lang. > ClassNotFoundException > at org.wso2.carbon.user.core.common.DefaultRealm. > createObjectWithOptions(DefaultRealm.java:401) > at org.wso2.carbon.user.core.common.DefaultRealm. > initializeObjects(DefaultRealm.java:222) > at org.wso2.carbon.user.core.common.DefaultRealm.init( > DefaultRealm.java:127) > at org.wso2.carbon.user.core.common.DefaultRealmService. > initializeRealm(DefaultRealmService.java:263) > at org.wso2.carbon.user.core.common.DefaultRealmService.< > init>(DefaultRealmService.java:100) > at org.wso2.carbon.user.core.common.DefaultRealmService.< > init>(DefaultRealmService.java:113) > at org.wso2.carbon.user.core.internal.Activator. > startDeploy(Activator.java:68) > at org.wso2.carbon.user.core.internal.BundleCheckActivator. > start(BundleCheckActivator.java:61) > at org.eclipse.osgi.framework.internal.core. > BundleContextImpl$1.run(BundleContextImpl.java:711) > at java.security.AccessController.doPrivileged(Native Method) > at org.eclipse.osgi.framework.internal.core.BundleContextImpl. > startActivator(BundleContextImpl.java:702) > at org.eclipse.osgi.framework.internal.core. > BundleContextImpl.start(BundleContextImpl.java:683) > at org.eclipse.osgi.framework.internal.core.BundleHost. > startWorker(BundleHost.java:381) > at org.eclipse.osgi.framework.internal.core.AbstractBundle. > resume(AbstractBundle.java:390) > at org.eclipse.osgi.framework.internal.core.Framework. > resumeBundle(Framework.java:1176) > at org.eclipse.osgi.framework.internal.core.StartLevelManager. > resumeBundles(StartLevelManager.java:559) > at org.eclipse.osgi.framework.internal.core.StartLevelManager. > resumeBundles(StartLevelManager.java:544) > at org.eclipse.osgi.framework.internal.core. > StartLevelManager.incFWSL(StartLevelManager.java:457) > at org.eclipse.osgi.framework.internal.core.StartLevelManager. > doSetStartLevel(StartLevelManager.java:243) > at org.eclipse.osgi.framework.internal.core.StartLevelManager. > dispatchEvent(StartLevelManager.java:438) > at org.eclipse.osgi.framework.internal.core.StartLevelManager. > dispatchEvent(StartLevelManager.java:1) > at org.eclipse.osgi.framework.eventmgr.EventManager. > dispatchEvent(EventManager.java:230) > at org.eclipse.osgi.framework.eventmgr.EventManager$ > EventThread.run(EventManager.java:340) > Caused by: java.lang.ClassNotFoundException: > com.wso2.custom.usermgt.CustomUserStoreManager > cannot be found by org.wso2.carbon.user.core_4.4.9 > at org.eclipse.osgi.internal.loader.BundleLoader. > findClassInternal(BundleLoader.java:501) > at org.eclipse.osgi.internal.loader.BundleLoader.findClass( > BundleLoader.java:421) > at org.eclipse.osgi.internal.loader.BundleLoader.findClass( > BundleLoader.java:412) > at org.eclipse.osgi.internal.baseadaptor. > DefaultClassLoader.loadClass(DefaultClassLoader.java:107) > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:264) > at org.wso2.carbon.user.core.common.DefaultRealm. > createObjectWithOptions(DefaultRealm.java:345) > > > Is there a missing config step in order to load the new jar? > According to exception I guess com.wso2.custom.usermgt.CustomUserStoreManager was not added to OSGI environment. You have to register CustomUserStoreManager as an OSGI service. CustomUserStoreManager customUserStoreManager = new CustomUserStoreManager(); ctxt.getBundleContext().registerService(UserStoreManager.class.getName(), customUserStoreManager, props); Please try sample code provided in [1]. [1] http://isurad.blogspot.com/2016/03/how-to-write-custom-user-store-manager.html > > > > Regards, > > > *Hanen Ben Rhouma* > *Java Tech Lead* > > On Tue, Nov 1, 2016 at 2:10 AM, Gayan Gunawardana <ga...@wso2.com> wrote: > >> Hi Hanen, >> >> On Mon, Oct 31, 2016 at 9:57 PM, Hanen Ben Rhouma <hanen...@gmail.com> >> wrote: >> >>> Thanks guys for your help but I guess I didn't explain it well; >>> Actually, I'm looking for a step by step configuration that allows me to >>> create an identity provider which jumps to our DB or any other inhouse >>> endpoint (it can be a REST endpoint) in order to retrieve user details and >>> aggregate them within the SAML token. Is there a way to do it through WSO2 >>> IS? >>> >> You can write custom user store manager according to [1] and override >> doAuthenticate, >> doGetUserClaimValue methods to jump into your DB or REST endpoint. >> Once you have custom user store, you can configure a service provider in >> WSO2 IS with SAML inbound protocol. >> >> [1] https://docs.wso2.com/display/IS520/Writing+a+Custom+User+St >> ore+Manager >> >>> >>> >>> Thanks, >>> Hanen >>> >>> >>> >>> On Fri, Oct 28, 2016 at 8:07 PM, Gayan Gunawardana <ga...@wso2.com> >>> wrote: >>> >>>> >>>> >>>> On Fri, Oct 28, 2016 at 2:54 PM, Lakshani Gamage <laksh...@wso2.com> >>>> wrote: >>>> >>>>> Hi Hanen, >>>>> >>>>> This article [1] contains how to communicate Identity server with REST >>>>> APIs. It will be a help to your POC. >>>>> >>>>> [1] http://wso2.com/library/articles/2016/10/article-exposing-ws >>>>> o2-identity-server-admin-services-the-rest-way/ >>>>> >>>>> Regards, >>>>> Lakshani >>>>> >>>>> On Fri, Oct 28, 2016 at 1:22 PM, Ben Rhouma, Hanen (FircoSoft) < >>>>> hanen.ben.rho...@fircosoft.com> wrote: >>>>> >>>>>> Hello, >>>>>> >>>>>> >>>>>> >>>>>> We’re working on a POC related to Authentication and Identity >>>>>> Management using WSO2. We’re looking for a way to configure the Identity >>>>>> Provider to communicate with a REST API or even a database in order to >>>>>> retrieve more details about the user trying to authenticate so that those >>>>>> details can be used to generate the token. >>>>>> >>>>> What sort of token you expect to generate ? >>>> If you are looking for REST way to get authenticated user information >>>> OIDC might help[1]. If you can explain exact use case we can help you more. >>>> >>>> [1]https://docs.wso2.com/display/IS520/OpenID+Connect >>>> >>>>> Is there a tutorial or a documentation part which can point us >>>>>> directly to such use case implementation? >>>>>> >>>>>> >>>>>> >>>>>> Regards, >>>>>> >>>>>> Hanen >>>>>> >>>>>> _______________________________________________ >>>>>> Dev mailing list >>>>>> Dev@wso2.org >>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Lakshani Gamage >>>>> >>>>> *Software Engineer, WSO2* >>>>> >>>>> *Mobile : +94 71 5478184 <%2B94%20%280%29%20773%20451194>* >>>>> *Blog : http://lakshanigamage.blogspot.com/ >>>>> <http://lakshanigamage.blogspot.com/>* >>>>> >>>> >>>> >>>> >>>> -- >>>> Gayan Gunawardana >>>> Software Engineer; WSO2 Inc.; http://wso2.com/ >>>> Email: ga...@wso2.com >>>> Mobile: +94 (71) 8020933 >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> Dev@wso2.org >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >> >> >> -- >> Gayan Gunawardana >> Software Engineer; WSO2 Inc.; http://wso2.com/ >> Email: ga...@wso2.com >> Mobile: +94 (71) 8020933 >> > > -- Gayan Gunawardana Software Engineer; WSO2 Inc.; http://wso2.com/ Email: ga...@wso2.com Mobile: +94 (71) 8020933
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev