From 072c71589fa94cdcca65a45b877430a8cde9547c Mon Sep 17 00:00:00 2001 From: john Date: Sun, 14 Jun 2020 00:38:21 +0800 Subject: [PATCH] rename pairMap to authMap --- auth.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auth.go b/auth.go index 7e2e708f..d4fa6c19 100644 --- a/auth.go +++ b/auth.go @@ -43,10 +43,10 @@ func BasicAuthForRealm(accounts Accounts, realm string) HandlerFunc { realm = "Authorization Required" } realm = "Basic realm=" + strconv.Quote(realm) - pairMap := processAccounts(accounts) + authMap := processAccounts(accounts) return func(c *Context) { // Search user in the slice of allowed credentials - user, found := pairMap.searchCredential(c.requestHeader("Authorization")) + user, found := authMap.searchCredential(c.requestHeader("Authorization")) if !found { // Credentials doesn't match, we return 401 and abort handlers chain. c.Header("WWW-Authenticate", realm)