fix: handle various nil pointers (#2473)

This commit is contained in:
Livio Amstutz
2021-10-05 08:33:20 +02:00
committed by GitHub
parent 318fa25061
commit 73a51c1544
7 changed files with 27 additions and 2 deletions

View File

@@ -13,6 +13,9 @@ func (c Context) set(name string, value interface{}) {
}
func (c *Context) SetToken(t *oidc.Tokens) *Context {
if t == nil {
return c
}
if t.Token != nil && t.Token.AccessToken != "" {
c.set("accessToken", t.AccessToken)
}