mirror of
https://github.com/astaxie/beego.git
synced 2024-12-23 04:30:50 +00:00
Merge pull request #3533 from tvanriper/patch-1
APIBaiscAuth is misspelling of APIBasicAuth
This commit is contained in:
commit
40d653e659
@ -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