Skip to content

Commit ddcd28e

Browse files
authored
APIBaiscAuth is misspelling of APIBasicAuth
Corrected APIBaiscAuth to APIBasicAuth. Maintained old name (forwarding to new one) for those still using the previous API function name.
1 parent 3224369 commit ddcd28e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

plugins/apiauth/apiauth.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ import (
7272
// AppIDToAppSecret is used to get appsecret throw appid
7373
type AppIDToAppSecret func(string) string
7474

75-
// APIBaiscAuth use the basic appid/appkey as the AppIdToAppSecret
76-
func APIBaiscAuth(appid, appkey string) beego.FilterFunc {
75+
// APIBasicAuth use the basic appid/appkey as the AppIdToAppSecret
76+
func APIBasicAuth(appid, appkey string) beego.FilterFunc {
7777
ft := func(aid string) string {
7878
if aid == appid {
7979
return appkey
@@ -83,6 +83,11 @@ func APIBaiscAuth(appid, appkey string) beego.FilterFunc {
8383
return APISecretAuth(ft, 300)
8484
}
8585

86+
// APIBaiscAuth calls APIBasicAuth for previous callers
87+
func APIBaiscAuth(appid, appkey string) beego.FilterFunc {
88+
return APIBaiscAuth(appid, appkey)
89+
}
90+
8691
// APISecretAuth use AppIdToAppSecret verify and
8792
func APISecretAuth(f AppIDToAppSecret, timeout int) beego.FilterFunc {
8893
return func(ctx *context.Context) {

0 commit comments

Comments
 (0)