Class OAuth2FeignRequestInterceptor

java.lang.Object
org.alfresco.rest.sdk.feign.oauth2.OAuth2FeignRequestInterceptor
All Implemented Interfaces:
feign.RequestInterceptor

public class OAuth2FeignRequestInterceptor extends Object implements feign.RequestInterceptor
Feign RequestInterceptor that makes use of the OAuth2 support classes from Spring Security to obtain an access token and add the corresponding authorization header to the feign request.
  • Constructor Summary

    Constructors
    Constructor
    Description
    OAuth2FeignRequestInterceptor(org.springframework.security.oauth2.client.OAuth2AuthorizedClientManager oAuth2AuthorizedClientManager, org.springframework.security.oauth2.client.OAuth2AuthorizeRequest oAuth2AuthorizeRequest, org.springframework.security.oauth2.client.OAuth2AuthorizedClientService authorizedClientService)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    apply(feign.RequestTemplate template)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OAuth2FeignRequestInterceptor

      public OAuth2FeignRequestInterceptor(org.springframework.security.oauth2.client.OAuth2AuthorizedClientManager oAuth2AuthorizedClientManager, org.springframework.security.oauth2.client.OAuth2AuthorizeRequest oAuth2AuthorizeRequest, org.springframework.security.oauth2.client.OAuth2AuthorizedClientService authorizedClientService)
      Constructor.
      Parameters:
      oAuth2AuthorizedClientManager - given OAuth2AuthorizedClientManager
      oAuth2AuthorizeRequest - given OAuth2AuthorizeRequest
      authorizedClientService - given OAuth2AuthorizedClientService
  • Method Details

    • apply

      public void apply(feign.RequestTemplate template)
      Specified by:
      apply in interface feign.RequestInterceptor