diff --git a/pkg/services/oauthserver/oasimpl/service.go b/pkg/services/oauthserver/oasimpl/service.go index 7e28f18b5c2..9c61e00efd1 100644 --- a/pkg/services/oauthserver/oasimpl/service.go +++ b/pkg/services/oauthserver/oasimpl/service.go @@ -219,7 +219,7 @@ func (s *OAuth2ServiceImpl) SaveExternalService(ctx context.Context, registratio return nil, errGenCred } - s.logger.Debug("Handle service account save") + s.logger.Debug("Save service account") saID, errSaveServiceAccount := s.saveServiceAccount(ctx, client.Name, client.ServiceAccountID, registration.Permissions) if errSaveServiceAccount != nil { return nil, errSaveServiceAccount @@ -260,8 +260,7 @@ func (s *OAuth2ServiceImpl) SaveExternalService(ctx context.Context, registratio // randString generates a a cryptographically secure random string of n bytes func (s *OAuth2ServiceImpl) randString(n int) (string, error) { res := make([]byte, n) - _, err := rand.Read(res) - if err != nil { + if _, err := rand.Read(res); err != nil { return "", err } return base64.RawURLEncoding.EncodeToString(res), nil