Update jwt regexp to include = (#16521)

Fixes #16501
pull/16532/head
Dan Cech 6 years ago committed by Carl Bergquist
parent 80f0be4d5c
commit b9cc476eb7
  1. 2
      pkg/login/social/generic_oauth.go

@ -231,7 +231,7 @@ func (s *SocialGenericOAuth) extractToken(data *UserInfoJson, token *oauth2.Toke
return false
}
jwtRegexp := regexp.MustCompile("^([-_a-zA-Z0-9]+)[.]([-_a-zA-Z0-9]+)[.]([-_a-zA-Z0-9]+)$")
jwtRegexp := regexp.MustCompile("^([-_a-zA-Z0-9=]+)[.]([-_a-zA-Z0-9=]+)[.]([-_a-zA-Z0-9=]+)$")
matched := jwtRegexp.FindStringSubmatch(idToken.(string))
if matched == nil {
s.log.Debug("id_token is not in JWT format", "id_token", idToken.(string))

Loading…
Cancel
Save