feature: goctl jwt (#91)

* rebase upstream

* rebase

* trim no need line

* trim no need line

* trim no need line

* update doc

* remove update

* remove no need

* remove no need

* goctl add jwt support

* goctl add jwt support

* goctl add jwt support

* goctl add jwt support

* goctl add jwt support

* goctl add jwt support

* goctl add jwt support

Co-authored-by: kingxt <dream4kingxt@163.com>
This commit is contained in:
kingxt
2020-09-21 16:38:23 +08:00
committed by GitHub
parent 3e7e466526
commit 5e6dcac734
4 changed files with 60 additions and 67 deletions

View File

@@ -180,6 +180,11 @@ func getRoutes(api *spec.ApiSpec) ([]group, error) {
handler: handler,
})
}
if value, ok := apiutil.GetAnnotationValue(g.Annotations, "server", "jwt"); ok {
groupedRoutes.authName = value
groupedRoutes.jwtEnabled = true
}
routes = append(routes, groupedRoutes)
}