modules/jooby-pac4j/src/main/java/org/jooby/pac4j/Auth.java
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;
  }
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;
  }
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.

@param pattern URL pattern to protect.
@param authenticator Authenticator to use.
@return This module.
Add a form auth client .