fix: token check and error unwrapping (#3648)

* fix: token check and error unwrapping

* remove unused code
This commit is contained in:
Livio Amstutz
2022-05-18 10:49:16 +02:00
committed by GitHub
parent 4ec006dd02
commit 616b31c959
13 changed files with 46 additions and 33 deletions

View File

@@ -89,7 +89,7 @@ func (repo *TokenVerifierRepo) VerifyAccessToken(ctx context.Context, tokenStrin
return token.UserID, "", "", "", token.ResourceOwner, nil
}
for _, aud := range token.Audience {
if verifierClientID == aud || projectID == aud || authz.GetInstance(ctx).ProjectID() == aud {
if verifierClientID == aud || projectID == aud {
return token.UserID, token.UserAgentID, token.ApplicationID, token.PreferredLanguage, token.ResourceOwner, nil
}
}