public Auth form ( final String pattern , final Class < ? extends Authenticator < UsernamePasswordCredentials > > authenticator ) { bindings . put ( pattern , ( binder , conf ) -> { 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 ( FormAuth . class ) ; return new FormFilter ( conf . getString ( "auth.form.loginUrl" ) , conf . getString ( "application.path" ) + authCallbackPath ( conf ) ) ; } ) ; return this ; }
Add a form auth client .