You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by ben_979 <ei...@gmail.com> on 2016/08/31 19:34:47 UTC
Java only client
I am trying to create a Java only client to be used for testing purposes. I
am using Stormpath. I'm attempting to create a SecurityManager from a
shiro.ini file. Here is the code:
Factory<SecurityManager> factory = new
IniSecurityManagerFactory("classpath:shiro.ini");
SecurityManager securityManager = factory.getInstance();
SecurityUtils.setSecurityManager(securityManager);
When executed, I get :
java.lang.ClassNotFoundException: com.stormpath.sdk.client.ApiKeys
I have searched for this class, and I have only found it in older versions
of stormpath-sdk-api, so it seems to either have been obsoleted or
relocated.
I am using :
shiro-core 1.3.1
stormpath-shiro-core 0.6.0
I'm new to this, so I'm not sure if I'm going about this the wrong way, or
if I just have a configuration mismatch?
Any guidance would be appreciated.
--
View this message in context: http://shiro-user.582556.n2.nabble.com/Java-only-client-tp7581253.html
Sent from the Shiro User mailing list archive at Nabble.com.
Re: Java only client
Posted by ben_979 <ei...@gmail.com>.
Posting the solution for completeness. Thanks VERY MUCH to Brian Demers for
helping me out.
It turns out that indeed was a problem with syncing the versions.
stormpath-shiro-core-0.6.0 is built with stormpath-sdk-api-1.0.RC2, so once
I changed the dependencies (I changed to stormpath-sdk-httpclient-1.0.RC2 as
well), I was able to have success.
--
View this message in context: http://shiro-user.582556.n2.nabble.com/Java-only-client-tp7581253p7581257.html
Sent from the Shiro User mailing list archive at Nabble.com.
Re: Java only client
Posted by Brian Demers <br...@gmail.com>.
It sounds like you are not getting the transitive dependencies.
This mailing list probably isn't the best forum for this, I'll follow
up with you directly.
On Wed, Aug 31, 2016 at 4:47 PM, ben_979 <ei...@gmail.com> wrote:
> Thank for the reply.
>
> I do have that dependency already. I also checked the contents of the
> stormpath-sdk-httpclient jar and it doesn't contain that class.
>
>
>
> --
> View this message in context: http://shiro-user.582556.n2.nabble.com/Java-only-client-tp7581253p7581255.html
> Sent from the Shiro User mailing list archive at Nabble.com.
Re: Java only client
Posted by ben_979 <ei...@gmail.com>.
Thank for the reply.
I do have that dependency already. I also checked the contents of the
stormpath-sdk-httpclient jar and it doesn't contain that class.
--
View this message in context: http://shiro-user.582556.n2.nabble.com/Java-only-client-tp7581253p7581255.html
Sent from the Shiro User mailing list archive at Nabble.com.
Re: Java only client
Posted by Brian Demers <br...@gmail.com>.
You are probably missing a dependency:
<dependency>
<groupId>com.stormpath.sdk</groupId>
<artifactId>stormpath-sdk-httpclient</artifactId>
</dependency>
On Wed, Aug 31, 2016 at 3:34 PM, ben_979 <ei...@gmail.com> wrote:
>
> I am trying to create a Java only client to be used for testing purposes. I
> am using Stormpath. I'm attempting to create a SecurityManager from a
> shiro.ini file. Here is the code:
>
> Factory<SecurityManager> factory = new
> IniSecurityManagerFactory("classpath:shiro.ini");
> SecurityManager securityManager = factory.getInstance();
> SecurityUtils.setSecurityManager(securityManager);
>
> When executed, I get :
>
> java.lang.ClassNotFoundException: com.stormpath.sdk.client.ApiKeys
>
> I have searched for this class, and I have only found it in older versions
> of stormpath-sdk-api, so it seems to either have been obsoleted or
> relocated.
>
> I am using :
> shiro-core 1.3.1
> stormpath-shiro-core 0.6.0
>
> I'm new to this, so I'm not sure if I'm going about this the wrong way, or
> if I just have a configuration mismatch?
>
> Any guidance would be appreciated.
>
>
>
>
> --
> View this message in context: http://shiro-user.582556.n2.nabble.com/Java-only-client-tp7581253.html
> Sent from the Shiro User mailing list archive at Nabble.com.