update changelog and docs
Signed-off-by: Christopher Diaz <cdiaz@rvohealth.com>
This commit is contained in:
@@ -2,4 +2,15 @@
|
||||
'@backstage/plugin-search-backend-module-explore': patch
|
||||
---
|
||||
|
||||
Allows for an optional token manager to authenticate requests from the collator to the explore backend
|
||||
Allows for an optional token manager to authenticate requests from the collator to the explore backend. For example:
|
||||
|
||||
```
|
||||
indexBuilder.addCollator({
|
||||
schedule: every10MinutesSchedule,
|
||||
factory: ToolDocumentCollatorFactory.fromConfig(env.config, {
|
||||
discovery: env.discovery,
|
||||
logger: env.logger,
|
||||
tokenManager: env.tokenManager,
|
||||
}),
|
||||
});
|
||||
```
|
||||
|
||||
@@ -39,3 +39,18 @@ backend.add(searchPlugin());
|
||||
backend.add(searchModuleExploreCollator({ schedule }));
|
||||
backend.start();
|
||||
```
|
||||
|
||||
### Using Auth Middleware
|
||||
|
||||
If your Backstage instance uses service-to-service authentication you can pass an optional tokenManager to the collator factory. This will ensure that the collator makes authenticated requests to the explore backend.
|
||||
|
||||
```tsx
|
||||
indexBuilder.addCollator({
|
||||
schedule: every10MinutesSchedule,
|
||||
factory: ToolDocumentCollatorFactory.fromConfig(env.config, {
|
||||
discovery: env.discovery,
|
||||
logger: env.logger,
|
||||
tokenManager: env.tokenManager,
|
||||
}),
|
||||
});
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user