Results 1 to 4 of 4

Thread: Oauth autowire ClientAuthenticationCache

  1. #1
    Join Date
    Nov 2007
    Posts
    6

    Default 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. #2
    Join Date
    May 2008
    Location
    Salt Lake City
    Posts
    167

    Default

    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.

  3. #3
    Join Date
    Nov 2007
    Posts
    6

    Default

    Ah right, interesting. Thanks.

    Tom

  4. #4
    Join Date
    May 2010
    Posts
    9

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •