Announcement Announcement Module
Collapse
No announcement yet.
Oauth autowire ClientAuthenticationCache Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Oauth autowire ClientAuthenticationCache

    Hey guys

    In the Sparklr2 demo there is an autowired bean called ClientAuthenticationCache, now excuse my stupidity(and lack of indepth autowiring understanding), but I can't see where this bean comes from and when I try and implement similar in my own app, it complains cause the bean isn't initialised and autowiring fails..

    Any suggestions to a spring newbie?

    thanks

    Tom

  • #2
    Hi.

    The sparklr2 app actually doesn't have autowiring enabled, so the default instance is actually getting used. I presume that in your app, the autowiring is enabled and you either need to declare an instance of that interface in your application context or just remove the @Autowired annotation.

    Comment


    • #3
      Ah right, interesting. Thanks.

      Tom

      Comment


      • #4
        A similar problem happens for me because OAuth2AuthorizationSuccessHandler has

        @Autowired
        public void setSerializationService(OAuth2SerializationService serializationService) {
        this.serializationService = serializationService;
        }

        yet it also initializes it by default:

        private OAuth2SerializationService serializationService = new DefaultOAuth2SerializationService();

        this seems like a bug?, that either setSerializationService should have
        @Autowired(required=false)

        or OAuth2ProviderBeanDefinitionParser should provide a definition of that bean by default.

        Comment

        Working...
        X