Class HttpBearerAuth

  • All Implemented Interfaces:
    feign.RequestInterceptor

    public class HttpBearerAuth
    extends java.lang.Object
    implements feign.RequestInterceptor
    An interceptor that adds the request header needed to use HTTP bearer authentication.
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpBearerAuth​(java.lang.String scheme)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void apply​(feign.RequestTemplate template)  
      java.lang.String getBearerToken()
      Gets the token, which together with the scheme, will be sent as the value of the Authorization header.
      void setBearerToken​(java.lang.String bearerToken)
      Sets the token, which together with the scheme, will be sent as the value of the Authorization header.
      • Methods inherited from class java.lang.Object

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

      • HttpBearerAuth

        public HttpBearerAuth​(java.lang.String scheme)
    • Method Detail

      • getBearerToken

        public java.lang.String getBearerToken()
        Gets the token, which together with the scheme, will be sent as the value of the Authorization header.
      • setBearerToken

        public void setBearerToken​(java.lang.String bearerToken)
        Sets the token, which together with the scheme, will be sent as the value of the Authorization header.
      • apply

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