e-Spirit/javascript-content-api-library

Allow extraHeaders for fetchNavigation

Closed this issue · 2 comments

In a new version the navigationService can be secured with a token authentication. In order to access it from the fsxa-api "fetchNavigation()" function, it should be possible to pass additional headers, e.g.

async fetchNavigation(
    initialPath: string | null,
    defaultLocale: string,
   extraHeaders?: Record<string, string[]>
  ): Promise<NavigationData | null> {

alternatively, the complete oauth2 flow could be supported by the fsxa-api

We merged your PR so that you can pass additional headers to the navigation-service. We will close this issue for now, since we do not plan on supporting specific auth-flows in the nearer future.