Skip to content

Commit

Permalink
bot pointed out that I missed the format variable
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Lee <dave@gray101.com>
  • Loading branch information
dave-gray101 committed Jun 9, 2024
1 parent 0b6b5e9 commit f118663
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/keyauth/keyauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func TokenFromContext(c fiber.Ctx) string {
func parseSingleExtractor(keyLookup string, authScheme string) (extractorFunc, error) {
parts := strings.Split(keyLookup, ":")
if len(parts) <= 1 {
return nil, fmt.Errorf("invalid keyLookup")
return nil, fmt.Errorf("invalid keyLookup: %s", keyLookup)

Check warning on line 104 in middleware/keyauth/keyauth.go

View check run for this annotation

Codecov / codecov/patch

middleware/keyauth/keyauth.go#L104

Added line #L104 was not covered by tests
}
extractor := keyFromHeader(parts[1], authScheme) // in the event of an invalid prefix, it is interpreted as header:
switch parts[0] {
Expand Down

0 comments on commit f118663

Please sign in to comment.