mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 18:10:55 +00:00
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.
This commit is contained in:
parent
3224369ac9
commit
ddcd28e67f
@ -72,8 +72,8 @@ import (
|
||||
// AppIDToAppSecret is used to get appsecret throw appid
|
||||
type AppIDToAppSecret func(string) string
|
||||
|
||||
// APIBaiscAuth use the basic appid/appkey as the AppIdToAppSecret
|
||||
func APIBaiscAuth(appid, appkey string) beego.FilterFunc {
|
||||
// APIBasicAuth use the basic appid/appkey as the AppIdToAppSecret
|
||||
func APIBasicAuth(appid, appkey string) beego.FilterFunc {
|
||||
ft := func(aid string) string {
|
||||
if aid == appid {
|
||||
return appkey
|
||||
@ -83,6 +83,11 @@ func APIBaiscAuth(appid, appkey string) beego.FilterFunc {
|
||||
return APISecretAuth(ft, 300)
|
||||
}
|
||||
|
||||
// APIBaiscAuth calls APIBasicAuth for previous callers
|
||||
func APIBaiscAuth(appid, appkey string) beego.FilterFunc {
|
||||
return APIBaiscAuth(appid, appkey)
|
||||
}
|
||||
|
||||
// APISecretAuth use AppIdToAppSecret verify and
|
||||
func APISecretAuth(f AppIDToAppSecret, timeout int) beego.FilterFunc {
|
||||
return func(ctx *context.Context) {
|
||||
|
Loading…
Reference in New Issue
Block a user