anchor.diff:    {
       return _serverUrl;
     }
  -<% if repository.keycloak? -%>
  +
  +  protected abstract com.google.gwt.event.shared.EventBus getEventBus();
  +<% if repository.keycloak? -%>
  +
  +  @Override
  +  public void onReady( @javax.annotation.Nonnull final org.realityforge.gwt.keycloak.Keycloak keycloak, final boolean authenticated )
  +  {
  +    if ( authenticated )
  +    {
  +      start();
  +    }
  +    else
  +    {
  +      keycloak.login();
  +    }
  +    if ( null != getEventBus() )
  +    {
  +      getEventBus().fireEventFromSource( new org.realityforge.gwt.keycloak.event.ReadyEvent( keycloak, authenticated ), keycloak );
  +    }
  +  }
  +
  +  @Override
  +  public void onAuthSuccess( @javax.annotation.Nonnull final org.realityforge.gwt.keycloak.Keycloak keycloak )
  +  {
  +    if ( null != getEventBus() )
  +    {
  +      getEventBus().fireEventFromSource( new org.realityforge.gwt.keycloak.event.AuthSuccessEvent( keycloak ), keycloak );
  +    }
  +  }
  +
  +  @Override
  +  public void onAuthError( @javax.annotation.Nonnull final org.realityforge.gwt.keycloak.Keycloak keycloak )
  +  {
  +    if ( null != getEventBus() )
  +    {
  +      getEventBus().fireEventFromSource( new org.realityforge.gwt.keycloak.event.AuthErrorEvent( keycloak ), keycloak );
  +    }
  +  }
  +
  +  @Override
  +  public void onAuthRefreshSuccess( @javax.annotation.Nonnull final org.realityforge.gwt.keycloak.Keycloak keycloak )
  +  {
  +    if ( null != getEventBus() )
  +    {
  +      getEventBus().fireEventFromSource( new org.realityforge.gwt.keycloak.event.AuthRefreshSuccessEvent( keycloak ), keycloak );
  +    }
  +  }
  +
  +  @Override
  +  public void onAuthRefreshError( @javax.annotation.Nonnull final org.realityforge.gwt.keycloak.Keycloak keycloak )
  +  {
  +    if ( null != getEventBus() )
  +    {
  +      getEventBus().fireEventFromSource( new org.realityforge.gwt.keycloak.event.AuthRefreshErrorEvent( keycloak ), keycloak );
  +    }
  +  }
  +
  +  @Override
  +  public void beforeAuthLogout( @javax.annotation.Nonnull final org.realityforge.gwt.keycloak.Keycloak keycloak )
  +  {
  +    if ( null != getEventBus() )
  +    {
  +      getEventBus().fireEventFromSource( new org.realityforge.gwt.keycloak.event.BeforeAuthLogoutEvent( keycloak ), keycloak );
  +    }
  +  }
  +
  +  @Override
  +  public void onAuthLogout( @javax.annotation.Nonnull final org.realityforge.gwt.keycloak.Keycloak keycloak )
  +  {
  +    if ( null != getEventBus() )
  +    {
  +      getEventBus().fireEventFromSource( new org.realityforge.gwt.keycloak.event.AuthLogoutEvent( keycloak ), keycloak );
  +    }
  +  }
  +
  +  @Override
  +  public void onTokenExpired( @javax.annotation.Nonnull final org.realityforge.gwt.keycloak.Keycloak keycloak )
  +  {
  +    if ( null != getEventBus() )
  +    {
  +      getEventBus().fireEventFromSource( new org.realityforge.gwt.keycloak.event.TokenExpiredEvent( keycloak ), keycloak );
  +    }
  +  }
   
     public void login()
     {
  
positive.code: 
  @javax.annotation.Generated( "Domgen" )
  public abstract class <%= repository.gwt.abstract_application_name %>
  {
  <% if repository.keycloak? -%>
    private final org.realityforge.gwt.keycloak.Keycloak _keycloak;
  
negative.code:     _serverUrl = _applicationURL.substring( 0, _applicationURL.indexOf( '/', _applicationURL.indexOf( "://" ) ) );
  <% if repository.keycloak? -%>
      _keycloak = new org.realityforge.gwt.keycloak.Keycloak( keycloakClient, _applicationURL + "/.keycloak/" + keycloakClient + "/keycloak.json" );
      getKeycloak().setListener( this );
  <% end -%>
    }
  
  