Interface OAuth2ClientHttpRequestInterceptor.ClientRegistrationIdResolver

All Known Implementing Classes:
RequestAttributeClientRegistrationIdResolver
Enclosing class:
OAuth2ClientHttpRequestInterceptor
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface OAuth2ClientHttpRequestInterceptor.ClientRegistrationIdResolver
A strategy for resolving a clientRegistrationId from an intercepted request.
  • Method Summary

    Modifier and Type
    Method
    Description
    resolve(org.springframework.http.HttpRequest request)
    Resolve the clientRegistrationId from the current request, which is used to obtain an OAuth2AuthorizedClient.
  • Method Details

    • resolve

      @Nullable String resolve(org.springframework.http.HttpRequest request)
      Resolve the clientRegistrationId from the current request, which is used to obtain an OAuth2AuthorizedClient.
      Parameters:
      request - the intercepted request, containing HTTP method, URI, headers, and request attributes
      Returns:
      the clientRegistrationId to be used for resolving an OAuth2AuthorizedClient.