1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-16 18:01:37 +00:00

Improve OAuth2 integration

This commit is contained in:
Frédéric Guillot 2017-11-24 16:09:10 -08:00
parent cc6d272eb7
commit 747da03e4c
16 changed files with 120 additions and 15 deletions

View file

@ -40,6 +40,13 @@ func (e *Engine) parseAll() {
"hasOAuth2Provider": func(provider string) bool {
return e.cfg.Get("OAUTH2_PROVIDER", "") == provider
},
"hasKey": func(dict map[string]string, key string) bool {
log.Println(dict)
if value, found := dict[key]; found {
return value != ""
}
return false
},
"route": func(name string, args ...interface{}) string {
return route.GetRoute(e.router, name, args...)
},