[aerogear-dev] AuthenticationManager injection question

Matthias Wessendorf matzew at apache.org
Thu Sep 19 12:48:12 EDT 2013


On Thu, Sep 19, 2013 at 6:46 PM, Apostolos Emmanouilidis <
aemmanou at redhat.com> wrote:

> **
> On Thu, 2013-09-19 at 18:21 +0200, Matthias Wessendorf wrote:
>
>
>
>
>  On Thu, Sep 19, 2013 at 6:04 PM, Apostolos Emmanouilidis <
> aemmanou at redhat.com> wrote:
>
>  I suppose that this happens because the CDI container cannot find  a
> bean which implements the bean type AuthenticationManager<Developer>. The
> AuthenticationManagerImpl which is available on classpath, implements the
> AuthenticationManager<Agent>.
>
> Ag-Push should deploy without errors when using
> AuthenticationManager<Agent> at the injection point.
>
>
>
>  yep 'Agent' as the parameterized typed works fine. Using 'Agent' works
> for me as well (instead of 'requiring' User, SimpleUser or even
> Developer).
>
>
>
>
> right, because User, SimpleUser, Developer extend Agent so
> AuthenticationManager<Agent> is not a bean type which implements
> AuthenticationManager<Developer or SimpleUser or User>. so the container
> cannot perform the resolution.
>

yep, should have looked at the default impl. before asking here :-)



>
>
>
>  Thanks!
>
>
>
>  -M
>
>
>
>
>
>
> On Thu, 2013-09-19 at 16:50 +0200, Matthias Wessendorf wrote:
>
> Hello
>
>
> Looking at the 'AuthenticationEndpoint' I noticed that the
> "org.jboss.aerogear.security.auth.AuthenticationManager" class ([1]) is
> used without parameterization:
>
> https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/rest/security/AuthenticationEndpoint.java#L41-L42
>
>
> This works fine, but I thought to actually apply a type, like:
>
>
> private AuthenticationManager<Developer> authenticationManager;
>
>
>
>
> But now I do get a DeploymentException:
> WELD-001408 Unsatisfied dependencies for type
> [AuthenticationManager<Developer>] with qualifiers [@Default] at injection
> point [[field] @Inject private
> org.jboss.aerogear.unifiedpush.rest.security.AuthenticationEndpoint.authenticationManager]
>
>
> I have also changed the parameterized type to be Picketlink's User, but I
> do get the same (almost the same) DeploymentException:
> WELD-001408 Unsatisfied dependencies for type
> [AuthenticationManager<User>] with qualifiers [@Default] at injection point
> [[field] @Inject private
> org.jboss.aerogear.unifiedpush.rest.security.AuthenticationEndpoint.authenticationManager]
>
>
> Any one knows what I am doing wrong ?
>
>
> Thanks,
> Matthias
>
>
> [1]
> https://github.com/aerogear/aerogear-security/blob/master/src/main/java/org/jboss/aerogear/security/auth/AuthenticationManager.java
>
>
>
>
>
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>
>    _______________________________________________
> aerogear-dev mailing listaerogear-dev at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
>
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
>
>
>
>  --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>
>  _______________________________________________
> aerogear-dev mailing listaerogear-dev at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20130919/da82a6a6/attachment-0001.html 


More information about the aerogear-dev mailing list