Hi Quang, >From the above, you are correctly obtaining the CarbonContext in your application. And it is populated with some information on current tenant where the tenant-domain is "carbon.super" and tenant-id is "-1234". These are the information you get when your application is deployed at super tenant level.
The logged in user-name is not being available in CarbonContext is looks like an issue. @ IS Team, For Basic Auth, shouldn't we set the user-name to CarbonContext, after the user is successfully authenticated? This can be added to the CarbonTomcatRealm, where the basic auth check is handled. On Sun, Feb 9, 2014 at 6:39 AM, Quang Cường Vũ <[email protected]> wrote: > Hi, dev. > > I write very simple program and deploy to Application Server > I use this code to obtain tenant context: > ie. index.jsp > <% > CarbonContext cCtx = CarbonContext.getCurrentContext(); > int tenantId = cCtx.getTenantId(); > String tenantDomain = cCtx.getTenantDomain(); > String tenantUsername = cCtx.getUsername(); > %> > <b>User Information</b> > <br> Tenant ID: > <%=tenantId%><br> Tenant domain: > <%=tenantDomain%><br> Tenant user name: > <%=tenantUsername%><br> > After I login, using BASIC authentication, index.jsp show result: > *User Information* > Tenant ID: -1234 > Tenant domain: carbon.super > Tenant user name: null > > Could you help me fix? Thank > > -- > > > *V u Q u a n g C u o n g * > > *Software developer and Trainer* > ------------------------------------ > Mobile: 0988.397.448 > Email: [email protected] > > > <http://www.wisestamp.com/> > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Kishanthan Thangarajah* Senior Software Engineer, Platform Technologies Team, WSO2, Inc. lean.enterprise.middleware Mobile - +94773426635 Blog - *http://kishanthan.wordpress.com <http://kishanthan.wordpress.com>* Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
