hasSecurityScopes returns true if the BearerAuthScopes key was set in context, even if the scopes slice is empty (an empty slice means the security scheme is defined on the operation with no required scopes, which still requires auth).
(c *fiber.Ctx)
| 25 | // even if the scopes slice is empty (an empty slice means the security scheme is |
| 26 | // defined on the operation with no required scopes, which still requires auth). |
| 27 | func hasSecurityScopes(c *fiber.Ctx) bool { |
| 28 | _, ok := c.Context().UserValue(BearerAuthScopes).([]string) |
| 29 | return ok |
| 30 | } |
| 31 | |
| 32 | func TestIssue518(t *testing.T) { |
| 33 | server := &impl{} |
no outgoing calls
no test coverage detected
searching dependent graphs…