Update docs/backend-system/core-services/http-auth.md

Signed-off-by: Johan Haals <johan.haals@gmail.com>

Co-authored-by: Peter Macdonald <macdonald.peter90@gmail.com>
Signed-off-by: Johan Haals <johan@haals.se>
This commit is contained in:
Johan Haals
2024-11-22 13:52:19 +01:00
committed by GitHub
parent 866ce05cc7
commit 5aad192efa
@@ -104,7 +104,7 @@ or [contribute](https://github.com/backstage/backstage/blob/master/CONTRIBUTING.
### Custom token extraction logic
In some cases, you might want to customize how tokens are extracted from incoming requests. It might be that you want to extract tokens from a different location in the request. To support this you supply your own slightly modified httpAuth service. The `DefaultHttpAuthService` class is exported from the `@backstage/backend-defaults` package and it's `create` method can be used to pass in a custom `getTokenFromRequest` extraction function.
In some cases, you might want to customize how tokens are extracted from incoming requests. It might be that you want to extract tokens from a different location in the request. To support this you can supply your own slightly modified httpAuth service. The `DefaultHttpAuthService` class is exported from the `@backstage/backend-defaults` package and it's `create` method can be used to pass in a custom `getTokenFromRequest` extraction function.
```ts
import { DefaultHttpAuthService } from '@backstage/backend-defaults/httpAuth';