type TokenGroupAdder … // NewTokenGroupAdder wraps a token authenticator, and adds the specified groups to the returned user when authentication succeeds func NewTokenGroupAdder(auth authenticator.Token, groups []string) authenticator.Token { … } func (g *TokenGroupAdder) AuthenticateToken(ctx context.Context, token string) (*authenticator.Response, bool, error) { … }