code: func (ra *RegistrationAuthorityImpl) onValidationUpdate(ctx context.Context, authz core.Authorization) error {
  	// Consider validation successful if any of the challenges
  	// specified in the authorization has been fulfilled
  	for _, ch := range authz.Challenges {
  		if ch.Status == core.StatusValid {
  			authz.Status = core.StatusValid
  		}
  	}
  
  	// If no validation succeeded, then the authorization is invalid
  	if authz.Status != core.StatusValid {
  		authz.Status = core.StatusInvalid
  	} else {
  		exp := ra.clk.Now().Add(ra.authorizationLifetime)
  		authz.Expires = &exp
  	}
  
  	// Finalize the authorization
  	err := ra.SA.FinalizeAuthorization(ctx, authz)
  	if err != nil {
  		return err
  	}
  
  	ra.stats.Inc("FinalizedAuthorizations", 1)
  	return nil
  }
docs: // onValidationUpdate saves a validation's new status after receiving an
  // authorization back from the VA.