public Auth basic ( final String pattern , final Class < ? extends Authenticator < UsernamePasswordCredentials > > authenticator ) { bindings . put ( pattern , ( binder , config ) -> { TypeLiteral < Authenticator < UsernamePasswordCredentials >> usernamePasswordAuthenticator = new TypeLiteral < Authenticator < UsernamePasswordCredentials > > ( ) { } ; binder . bind ( usernamePasswordAuthenticator . getRawType ( ) ) . to ( authenticator ) ; bindProfile ( binder , CommonProfile . class ) ; Multibinder . newSetBinder ( binder , Client . class ) . addBinding ( ) . toProvider ( BasicAuth . class ) ; return new AuthFilter ( IndirectBasicAuthClient . class , CommonProfile . class ) ; } ) ; return this ; }
Add a basic auth client .