Skip to content
This repository was archived by the owner on May 31, 2022. It is now read-only.
This repository was archived by the owner on May 31, 2022. It is now read-only.

OAuth2RestTemplate is not thread-safe #554

@harti2006

Description

@harti2006

They way, how OAuth2RestTemplate stores access tokens in its OAuth2ClientContext context field and finally passes it to the authenticator, that writes the auth header to the request, is not thread safe.

That means, using a single instance of OAuth2RestTemplate from multiple threads in parallel might lead to wrong access tokens being send around.

The original RestTemplate is thread safe, so I was surprised, that this one is not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions