export type AuthenticationConfig = AuthenticationConfig_Disabled | AuthenticationConfig_EnabledKeycloak
export type AuthenticationConfig_Disabled = {
  enableAuthentication: false
}
export type AuthenticationConfig_EnabledKeycloak = {
  enableAuthentication: true
  /**
   * The URL of the backend server.
   */
  url: URL

  /**
   * The prefix of the path of the backend server.
   */
  urlPrefix: string

  /**
   * The URL of the frontend server.
   */
  frontendUrl: URL | undefined

  /**
   * The Id of the Keycloak client.
   */
  clientId: string

  /**
   * The secret of the Keycloak client.
   */
  clientSecret: string

  /**
   * The Id of the Keycloak realm.
   */
  realm: string

  /**
   * The URL of the Keycloak server.
   */
  keycloakUrl: URL

  /**
   * The URI to redirect to with a token.
   */
  redirectUrl: URL

  /**
   * The URL to redirect to after logout.
   */
  postLogoutRedirectUrl: URL | undefined
}
