Not ale to get the Subject second time after authentication.

2018-03-12 Thread nitincn
Hi, I have Java web application which calls another Shiro managed application which will checks authentication. Once authentication is done, I'm getting the Subject (Subject currentUser =SecurityUtils.getSubject();). Web Application is in the same session calls. Then web application requests ano

Re: Not ale to get the Subject second time after authentication.

2018-03-12 Thread nitincn
Im not using Shiro Servlet filter. My stacks - 1) Java webapp application. It has rest controller. It calls Shiro Authentication manager rest api. 2) Separately hosted Shiro Authentication Manager. This will do authentication and permission checks. This also has rest controller. Type of authen

Re: Not ale to get the Subject second time after authentication.

2018-03-12 Thread nitincn
Hi Brian, I'm using Shiro 1.4.0 version. For JDBC realm, in Shoro.INI added jdbcRealm.authenticationQuery and securityManager.realms = $jdbcRealm. Yes, wrote custom code for login. So extended JdbcRealm. In this custom realm, calling doGetAuthenticationInfo and doGetAuthorizationInfo methods.

Re: Not ale to get the Subject second time after authentication.

2018-03-13 Thread nitincn
Hi Brian, Today I have added Shiro's filters. Still issue is not fixed. Do you think problem is due to I'm hosting web application and Shiro auth provider as different applications? >From web application i'm calling Shiro auth provider's rest api for authentication. So do you think session will

Re: Not ale to get the Subject second time after authentication.

2018-03-13 Thread nitincn
Sure Brian. Can you please share me your email id. I'll post the sample code. -- Sent from: http://shiro-developer.582600.n2.nabble.com/

Re: Not ale to get the Subject second time after authentication.

2018-03-13 Thread nitincn
No Brian, Im calling realm by override. Attached my sample code. thanks Nitin C N Shiro_AUTH_Provider_Application.docx -- Sent from: http://shiro-developer.582600.n2.nabble.com/

Re: Not ale to get the Subject second time after authentication.

2018-03-13 Thread nitincn
If i not needed custom 'ShiroAuthentication' class, how to initialize authentication by passing login name and password from rest controller? Should i call jdbcrealm method directly from controller? I didn't find examples which suits my requirement. -- Sent from: http://shiro-developer.582600

Re: Not ale to get the Subject second time after authentication.

2018-03-14 Thread nitincn
For standalone application which has login page form, i don't have issues. My Shiro auth provider application doesn't have login page. Another Java web application has login page and rest controller. It is spring rest application. Also, observed log files. Got to know that session id is not pres

Re: Not ale to get the Subject second time after authentication.

2018-03-19 Thread nitincn
Hi Brian, Thanks for heads up. I have added Session Id got from shiro auth provider as cookie to request header. HttpGet getmethod = new HttpGet("http://localhost:8080/shiroauthproviderapp/auth/getalluser";); getmethod .setHeader("Authorization", "bearer " + _session_id); //not necessary getmet

Unable to @Autowire my DAO in a Custom Apache Shiro AuthorizingRealm

2018-04-21 Thread nitincn
Hi, I'm facing issue with @Autowire my DAO which is null during execution of Custom Apache Shiro AuthorizingRealm. In this DAO i'm getting roles and user's permissions to load in authorization context of user. I have Shiro.INI file. In web.xml , i have EnvironmentLoaderListener. Can you please

Re: Unable to @Autowire my DAO in a Custom Apache Shiro AuthorizingRealm

2018-04-24 Thread nitincn
Hi Brian, I'm using Shiro 1.4.0 version. Spring version 4.3.3.RELEASE. I have shiro.INI configuration. I'm not using XML based beans. I have extended JdbcRealm. In that overriding method doGetAuthorizationInfo. Inside this method i'm calling userDAO method to get the records from DB. In my Servl