Class BasicAuthProvider

  • All Implemented Interfaces:
    ClientRequestInterceptor

    public class BasicAuthProvider
    extends java.lang.Object
    implements ClientRequestInterceptor

    Provides HTTP Basic Authentication by using the request interceptor api

    Author:
    Tassilo Weidner
    • Constructor Summary

      Constructors 
      Constructor Description
      BasicAuthProvider​(java.lang.String username, java.lang.String password)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String encodeToBase64​(java.lang.String decodedString)  
      void intercept​(ClientRequestContext requestContext)
      Has been invoked before a request is sent to the http server
      • Methods inherited from class java.lang.Object

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

      • username

        protected java.lang.String username
      • password

        protected java.lang.String password
    • Constructor Detail

      • BasicAuthProvider

        public BasicAuthProvider​(java.lang.String username,
                                 java.lang.String password)
    • Method Detail

      • encodeToBase64

        protected java.lang.String encodeToBase64​(java.lang.String decodedString)