Skip to content

Commit

Permalink
fix: pick only Bearer in OpenId security
Browse files Browse the repository at this point in the history
  • Loading branch information
GiovanniCardamone committed May 12, 2022
1 parent 0be1851 commit d2f1109
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,9 @@ function getOpenIdConnectSecurityData(
security: OpenIdConnectAuth,
request: FastifyRequest
) {
return request.headers.authorization
return request.headers.authorization?.startsWith('Bearer ')
? request.headers.authorization
: undefined
}

export * from './types'

0 comments on commit d2f1109

Please sign in to comment.