Skip to content
Snippets Groups Projects
Commit a52d19e9 authored by Niall Sheridan's avatar Niall Sheridan
Browse files

Validate tokens correctly

This switch statement doesn't do what I thought it does
parent dc9d941c
Branches
No related tags found
No related merge requests found
...@@ -73,9 +73,7 @@ func (c *Config) Valid(token *oauth2.Token) bool { ...@@ -73,9 +73,7 @@ func (c *Config) Valid(token *oauth2.Token) bool {
if err != nil { if err != nil {
return false return false
} }
switch { if ti.Audience != c.config.ClientID || ui.Hd != c.domain {
case ti.Audience != c.config.ClientID:
case ui.Hd != c.domain:
return false return false
} }
return true return true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment