-
-
Notifications
You must be signed in to change notification settings - Fork 312
Open
Labels
need-investigationNeeds more investigation to identify if it is a bug.Needs more investigation to identify if it is a bug.
Description
I use the shouldAddToken token with customBearerTokenInterceptor, but it seems like the bearer token is added to every url, if return false it still added the bearer token,
If using the urlPattern with includeBearerTokenInterceptor it, then it works like expected
const customCondition: CustomBearerTokenCondition = {
shouldAddToken: async (req: any, next: HttpHandlerFn, keycloak: Keycloak) => {
// Add token only for requests to the / api endpoint
return req.url.startsWith('/api') && keycloak.authenticated;
}
};
I think something goes wrong here, shouldAddToken is false but it 's find a matching condition
const matchingCondition = conditions.find(async condition => await condition.shouldAddToken(req, next, keycloak));
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
need-investigationNeeds more investigation to identify if it is a bug.Needs more investigation to identify if it is a bug.